Skip to content

Commit

Permalink
remove some duplicate attribute declarations for xmllint
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Jan 8, 2025
1 parent 2a705e0 commit 54f6dbd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 70 deletions.
13 changes: 3 additions & 10 deletions project-examples/scripts/latex-document.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ BChapter= element latexSEbible:Chapter {

Chapter-Title = element latexSEbible:Chapter-Title {
attribute rolemaps-to {"H3"},
pdf2-attributes,
attribute id {text}?,
attribute title {text}?,
(text|Span)*
}
Expand Down Expand Up @@ -279,7 +279,7 @@ pdf2-attributes,

sechead.content =
pdf2-attributes,
(Art?&Sect?&(text|Art|Sect|NonStruct|Private|Note|Code|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|BibEntry|Figure|Formula|Artifact)*)
(Art?&Sect?&(text|NonStruct|Private|Note|Code|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|BibEntry|Figure|Formula|Artifact)*)

H1 = element pdf2:H1 {sechead.content}
H2 = element pdf2:H2 {sechead.content}
Expand Down Expand Up @@ -373,12 +373,11 @@ pdf2-attributes,

Form = element pdf2:Form {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
printfield-attributes,
(
(Caption? & (Part|Div|NonStruct|Private|Note|Code|Lbl|Reference|FENote|L|BibEntry|Table|Caption|Figure|Formula|Artifact))* # Grouping
(Caption? & (Part|Div|NonStruct|Private|Note|Code|Lbl|Reference|FENote|L|BibEntry|Table|Figure|Formula|Artifact))* # Grouping
|
(Caption? & (text|Div|NonStruct|Private|Note|Lbl|FENote|BibEntry|Artifact)*) # Block
)
Expand Down Expand Up @@ -437,7 +436,6 @@ pdf2-attributes,
L = element pdf2:L {
pdf2-attributes,
list-attributes,
attribute Layout:BBox {text}?,
(Caption? & (NonStruct|Private|L|LI|Artifact)*)
}

Expand All @@ -462,7 +460,6 @@ pdf2-attributes,

Table = element pdf2:Table {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
table-attributes,
Expand Down Expand Up @@ -494,7 +491,6 @@ TR = element pdf2:TR {

TH = element pdf2:TH {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
attribute Layout:BlockAlign {"Before" | "Middle" | "After" | "Justify"}?,
Expand All @@ -511,7 +507,6 @@ TH = element pdf2:TH {

TD = element pdf2:TD {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
attribute Layout:BlockAlign {"Before" | "Middle" | "After" | "Justify"}?,
Expand All @@ -535,7 +530,6 @@ Caption = element pdf2:Caption {

Figure = element pdf2:Figure {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
(
Expand All @@ -549,7 +543,6 @@ Figure = element pdf2:Figure {

Formula = element pdf2:Formula {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
(H? & Caption? & (text|Part|Div|Aside|BlockQuote|NonStruct|Private|P|Note|Code|Hn|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|Index|L|BibEntry|Table|Figure|Formula|Artifact|
Expand Down
28 changes: 3 additions & 25 deletions project-examples/scripts/latex-document.rng
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@
<attribute name="rolemaps-to">
<value>H3</value>
</attribute>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="id"/>
</optional>
<optional>
<attribute name="title"/>
</optional>
Expand Down Expand Up @@ -912,8 +914,6 @@
<zeroOrMore>
<choice>
<text/>
<ref name="Art"/>
<ref name="Sect"/>
<ref name="NonStruct"/>
<ref name="Private"/>
<ref name="Note"/>
Expand Down Expand Up @@ -1425,9 +1425,6 @@
<define name="Form">
<element name="pdf2:Form">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand All @@ -1454,7 +1451,6 @@
<ref name="L"/>
<ref name="BibEntry"/>
<ref name="Table"/>
<ref name="Caption"/>
<ref name="Figure"/>
<ref name="Formula"/>
<ref name="Artifact"/>
Expand Down Expand Up @@ -1694,9 +1690,6 @@
<element name="pdf2:L">
<ref name="pdf2-attributes"/>
<ref name="list-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<interleave>
<optional>
<ref name="Caption"/>
Expand Down Expand Up @@ -1803,9 +1796,6 @@
<a:documentation>Tables</a:documentation>
<element name="pdf2:Table">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -1898,9 +1888,6 @@
<define name="TH">
<element name="pdf2:TH">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -1988,9 +1975,6 @@
<define name="TD">
<element name="pdf2:TD">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -2156,9 +2140,6 @@
<define name="Figure">
<element name="pdf2:Figure">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -2259,9 +2240,6 @@
<a:documentation>Formula</a:documentation>
<element name="pdf2:Formula">
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down
13 changes: 3 additions & 10 deletions project-examples/scripts/latex-document17.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ BChapter= element latexSEbible:Chapter {

Chapter-Title = element latexSEbible:Chapter-Title {
attribute rolemaps-to {"H3"},
pdf2-attributes,
attribute id {text}?,
attribute title {text}?,
(text|Span)*
}
Expand Down Expand Up @@ -282,7 +282,7 @@ pdf2-attributes,

sechead.content =
pdf2-attributes,
(Art?&Sect?&(text|Art|Sect|NonStruct|Private|Note|Code|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|BibEntry|Figure|Formula|Artifact)*)
(Art?&Sect?&(text|NonStruct|Private|Note|Code|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|BibEntry|Figure|Formula|Artifact)*)

H1 = element pdf2:H1 {sechead.content}
H2 = element pdf2:H2 {sechead.content}
Expand Down Expand Up @@ -376,12 +376,11 @@ pdf2-attributes,

Form = element pdf2:Form {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
printfield-attributes,
(
(Caption? & (Part|Div|NonStruct|Private|Note|Code|Lbl|Reference|FENote|L|BibEntry|Table|Caption|Figure|Formula|Artifact))* # Grouping
(Caption? & (Part|Div|NonStruct|Private|Note|Code|Lbl|Reference|FENote|L|BibEntry|Table|Figure|Formula|Artifact))* # Grouping
|
(Caption? & (text|Div|NonStruct|Private|Note|Lbl|FENote|BibEntry|Artifact)*) # Block
)
Expand Down Expand Up @@ -440,7 +439,6 @@ pdf2-attributes,
L = element pdf2:L {
pdf2-attributes,
list-attributes,
attribute Layout:BBox {text}?,
(Caption? & (NonStruct|Private|L|LI|Artifact)*)
}

Expand All @@ -465,7 +463,6 @@ pdf2-attributes,

Table = element pdf2:Table {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
table-attributes,
Expand Down Expand Up @@ -497,7 +494,6 @@ TR = element pdf2:TR {

TH = element pdf2:TH {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
attribute Layout:BlockAlign {"Before" | "Middle" | "After" | "Justify"}?,
Expand All @@ -514,7 +510,6 @@ TH = element pdf2:TH {

TD = element pdf2:TD {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
attribute Layout:BlockAlign {"Before" | "Middle" | "After" | "Justify"}?,
Expand All @@ -538,7 +533,6 @@ Caption = element pdf2:Caption {

Figure = element pdf2:Figure {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
(
Expand All @@ -552,7 +546,6 @@ Figure = element pdf2:Figure {

Formula = element pdf2:Formula {
pdf2-attributes,
attribute Layout:BBox {text}?,
attribute Layout:Width {text}?,
attribute Layout:Height {text}?,
(H? & Caption? & (text|Part|Div|Aside|BlockQuote|NonStruct|Private|P|Note|Code|Hn|Sub|Lbl|Em|Strong|Span|Quote|Link|Reference|Annot|Form|Ruby|Warichu|FENote|Index|L|BibEntry|Table|Figure|Formula|Artifact|
Expand Down
28 changes: 3 additions & 25 deletions project-examples/scripts/latex-document17.rng
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,9 @@
<attribute name="rolemaps-to">
<value>H3</value>
</attribute>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="id"/>
</optional>
<optional>
<attribute name="title"/>
</optional>
Expand Down Expand Up @@ -964,8 +966,6 @@
<zeroOrMore>
<choice>
<text/>
<ref name="Art"/>
<ref name="Sect"/>
<ref name="NonStruct"/>
<ref name="Private"/>
<ref name="Note"/>
Expand Down Expand Up @@ -1496,9 +1496,6 @@
<element>
<name ns="">Form</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand All @@ -1525,7 +1522,6 @@
<ref name="L"/>
<ref name="BibEntry"/>
<ref name="Table"/>
<ref name="Caption"/>
<ref name="Figure"/>
<ref name="Formula"/>
<ref name="Artifact"/>
Expand Down Expand Up @@ -1773,9 +1769,6 @@
<name ns="">L</name>
<ref name="pdf2-attributes"/>
<ref name="list-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<interleave>
<optional>
<ref name="Caption"/>
Expand Down Expand Up @@ -1886,9 +1879,6 @@
<element>
<name ns="">Table</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -1986,9 +1976,6 @@
<element>
<name ns="">TH</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -2077,9 +2064,6 @@
<element>
<name ns="">TD</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -2247,9 +2231,6 @@
<element>
<name ns="">Figure</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down Expand Up @@ -2351,9 +2332,6 @@
<element>
<name ns="">Formula</name>
<ref name="pdf2-attributes"/>
<optional>
<attribute name="Layout:BBox"/>
</optional>
<optional>
<attribute name="Layout:Width"/>
</optional>
Expand Down

0 comments on commit 54f6dbd

Please sign in to comment.