Skip to content

Commit

Permalink
Stylesheets group fix: When merging class
Browse files Browse the repository at this point in the history
attributes, treat missing mode attribute as mode=add.
  • Loading branch information
sydb committed Oct 29, 2024
1 parent b5cdfd2 commit 6f38962
Show file tree
Hide file tree
Showing 11 changed files with 1,139 additions and 237 deletions.
208 changes: 163 additions & 45 deletions Test/expected-results/test.rng

Large diffs are not rendered by default.

136 changes: 130 additions & 6 deletions Test/expected-results/test15.odd.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2466,8 +2466,13 @@ desc =
att.cmc.attributes,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Suggested values include: 1] deprecationInfo (deprecation information)
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }

## (deprecation
## information) This element describes why or how its parent element is being deprecated, typically including recommendations for alternate encoding.
"deprecationInfo"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
empty
}
Expand Down Expand Up @@ -2865,8 +2870,21 @@ num =
att.cmc.attributes,

## indicates the type of numeric value.
## Suggested values include: 1] cardinal; 2] ordinal; 3] fraction; 4] percentage
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }

## absolute number, e.g. 21, 21.5
"cardinal"
|
## ordinal number, e.g. 21st
"ordinal"
|
## fraction, e.g. one half or three-quarters
"fraction"
|
## a percentage
"percentage"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,

## supplies the value of the number in standard form.
Expand Down Expand Up @@ -2958,6 +2976,7 @@ abbr =
att.cmc.attributes,

## (type) allows the encoder to classify the abbreviation according to some convenient typology.
## Sample values include: 1] suspension (suspension); 2] contraction (contraction); 3] brevigraph; 4] superscription (superscription); 5] acronym (acronym); 6] title (title); 7] organization (organization); 8] geographic (geographic)
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -3077,8 +3096,29 @@ ref =
att.cmc.attributes,

## (type) describes the nature of the items in the list.
## Suggested values include: 1] gloss (gloss); 2] index (index); 3] instructions (instructions); 4] litany (litany); 5] syllogism (syllogism)
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
[
a:documentation [
"(gloss) each list item glosses some term or concept, which is given by a "
ns1:code [ "<label>" ]
" element preceding the list item."
]
]
"gloss"
|
## (index) each list item is an entry in an index such as the alphabetical topical index at the back of a print volume.
"index"
|
## (instructions) each list item is a step in a sequence of instructions, as in a recipe.
"instructions"
|
## (litany) each list item is one of a sequence of petitions, supplications or invocations, typically in a religious ritual.
"litany"
|
## (syllogism) each list item is part of an argument consisting of two or more propositions and a final conclusion derived from them.
"syllogism"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
empty
}
Expand Down Expand Up @@ -3497,6 +3537,7 @@ title =
att.cmc.attributes,

## classifies the title according to some convenient typology.
## Sample values include: 1] main; 2] sub (subordinate); 3] alt (alternate); 4] short; 5] desc (descriptive)
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -3913,6 +3954,7 @@ divGen =
att.typed.attribute.subtype,

## specifies what type of generated text division (e.g. index, table of contents, etc.) is to appear.
## Sample values include: 1] index; 2] toc; 3] figlist; 4] tablist
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -4174,8 +4216,47 @@ idno =
att.cmc.attributes,

## categorizes the identifier, for example as an ISBN, Social Security number, etc.
## Suggested values include: 1] ISBN; 2] ISSN; 3] DOI; 4] URI; 5] VIAF; 6] ESTC; 7] OCLC
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
[
a:documentation [
"International Standard Book Number: a 13- or (if assigned prior to 2007) 10-digit identifying number assigned by the publishing industry to a published book or similar item, registered with the "
ns1:a [
href = "https://www.isbn-international.org"
" International ISBN Agency."
]
"\x{a}" ~
" "
]
]
"ISBN"
|
## International Standard Serial Number: an eight-digit number to uniquely identify a serial publication.
"ISSN"
|
## Digital Object Identifier: a unique string of letters and numbers assigned to an electronic document.
"DOI"
| [
a:documentation [
"Uniform Resource Identifier: a string of characters to uniquely identify a resource, following the syntax of "
ns1:a [
href = "https://datatracker.ietf.org/doc/html/rfc3986"
"RFC 3986"
]
"."
]
]
"URI"
|
## A data number in the Virtual Internet Authority File assigned to link different names in catalogs around the world for the same entity.
"VIAF"
|
## English Short-Title Catalogue number: an identifying number assigned to a document in English printed in the British Isles or North America before 1801.
"ESTC"
|
## OCLC control number (record number) for the union catalog record in WorldCat, a union catalog for member libraries in the Online Computer Library Center global cooperative.
"OCLC"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
(
## indicates one or more systems or calendars to which the date represented by the content of this element belongs.
Expand Down Expand Up @@ -5249,8 +5330,24 @@ correspAction =
att.sortable.attributes,

## describes the nature of the action.
## Suggested values include: 1] sent; 2] received; 3] transmitted; 4] redirected; 5] forwarded
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }

## information concerning the sending or dispatch of a message.
"sent"
|
## information concerning the receipt of a message.
"received"
|
## information concerning the transmission of a message, i.e. between the dispatch and the next receipt, redirect or forwarding.
"transmitted"
|
## information concerning the redirection of an unread message.
"redirected"
|
## information concerning the forwarding of a message.
"forwarded"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
empty
}
Expand Down Expand Up @@ -5772,9 +5869,25 @@ titlePart =
att.typed.attribute.subtype,

## (type) specifies the role of this subdivision of the title.
## Suggested values include: 1] main (main); 2] sub (subordinate); 3] alt (alternate); 4] short (short); 5] desc (descriptive)
[ a:defaultValue = "main" ]
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }

## (main) main title of the work
"main"
|
## (subordinate) subtitle of the work
"sub"
|
## (alternate) alternative title of the work
"alt"
|
## (short) abbreviated form of title
"short"
|
## (descriptive) descriptive paraphrase of the work
"desc"
| xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
empty
}
Expand Down Expand Up @@ -7297,6 +7410,7 @@ affiliation =
att.cmc.attributes,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] sponsor; 2] recommend; 3] discredit; 4] pledged
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7344,6 +7458,7 @@ age =
att.dimensions.attributes,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] western; 2] sui; 3] subjective; 4] objective; 5] inWorld (in world); 6] chronological; 7] biological; 8] psychological; 9] functional
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7395,6 +7510,7 @@ birth =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] caesarean (caesarean section); 2] vaginal (vaginal delivery); 3] exNihilo (ex nihilo); 4] incorporated; 5] founded; 6] established
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7489,6 +7605,7 @@ death =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] proclaimed; 2] assumed; 3] verified; 4] clinical; 5] brain; 6] natural; 7] unnatural; 8] fragmentation; 9] dissolution
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7536,6 +7653,7 @@ education =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] primary; 2] secondary; 3] undergraduate; 4] graduate; 5] residency; 6] apprenticeship
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7635,6 +7753,7 @@ faith =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] practicing; 2] clandestine; 3] patrilineal; 4] matrilineal; 5] convert
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -7785,6 +7904,7 @@ langKnowledge =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] listening; 2] speaking; 3] reading; 4] writing
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -8016,6 +8136,7 @@ nationality =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] birth; 2] naturalised; 3] self-assigned
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -8063,6 +8184,7 @@ occupation =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] primary; 2] other; 3] paid; 4] unpaid
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -8520,6 +8642,7 @@ residence =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] primary; 2] secondary; 3] temporary; 4] permanent
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down Expand Up @@ -8615,6 +8738,7 @@ socecStatus =
att.typed.attribute.subtype,

## characterizes the element in some sense, using any convenient classification scheme or typology.
## Sample values include: 1] atBirth; 2] atDeath; 3] dependent; 4] inherited; 5] independent
attribute type {
xsd:token { pattern = "[^\p{C}\p{Z}]+" }
}?,
Expand Down
Loading

0 comments on commit 6f38962

Please sign in to comment.