Skip to content

Commit

Permalink
make referenced-as an attribute not PI
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcarlisle committed Jan 9, 2025
1 parent 8663f33 commit eda07fa
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
13 changes: 12 additions & 1 deletion project-examples/scripts/latex-document.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,19 @@ H6 |= element latexSEbook:subparagraph {attribute rolemaps-to {"H6"}, sechead.c
# LaTeX Bible Markup Namepace

Sect |= element latexSEbible:Frontmatter {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Frontmatter-Title,TOC?,text-unit*}

Sect |= element latexSEbible:Testament {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Testament-Title,TOC?,text-unit*,Book*}

Testament = element latexSEbible:Testament {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Testament-Title,
Expand All @@ -79,20 +82,23 @@ Testament = element latexSEbible:Testament {
}

Frontmatter-Title = element latexSEbible:Frontmatter-Title {
showtags-attributes,
attribute rolemaps-to {"H1"},
attribute id {text}?,
attribute title {text},
Span*
}

Testament-Title = element latexSEbible:Testament-Title {
showtags-attributes,
attribute rolemaps-to {"H1"},
attribute id {text}?,
attribute title {text},
Span*
}

Book = element latexSEbible:Book {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Book-Title,
Expand All @@ -102,13 +108,15 @@ Book = element latexSEbible:Book {
}

Book-Title = element latexSEbible:Book-Title {
showtags-attributes,
attribute rolemaps-to {"H2"},
attribute id {text}?,
attribute title {text},
Span*
}

BChapter= element latexSEbible:Chapter {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Chapter-Title?,
Expand All @@ -118,13 +126,15 @@ BChapter= element latexSEbible:Chapter {
}

Chapter-Title = element latexSEbible:Chapter-Title {
showtags-attributes,
attribute rolemaps-to {"H3"},
attribute id {text}?,
attribute title {text}?,
(text|Span)*
}

Bverse= element latexSEbible:verse {
showtags-attributes,
attribute rolemaps-to {"P"},
pdf2-attributes,
(text|text-unit|Span)*
Expand All @@ -144,7 +154,8 @@ pdf2-attributes =

showtags-attributes =
attribute af {"yes" | "no"}?,
attribute rolemapped-from {text}?
attribute rolemapped-from {text}?,
attribute referenced-as {text}?

# Standard Attribute Owner Namespaces (such as CSS3, HTML-5.00) apart from the ones listed here
# and also vendor-specific namespaced attributes are allowed with any name/value.
Expand Down
13 changes: 13 additions & 0 deletions project-examples/scripts/latex-document.rng
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
<!-- LaTeX Bible Markup Namepace -->
<define name="Sect" combine="choice">
<element name="latexSEbible:Frontmatter">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -159,6 +160,7 @@
</define>
<define name="Sect" combine="choice">
<element name="latexSEbible:Testament">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -179,6 +181,7 @@
</define>
<define name="Testament">
<element name="latexSEbible:Testament">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -202,6 +205,7 @@
</define>
<define name="Frontmatter-Title">
<element name="latexSEbible:Frontmatter-Title">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H1</value>
</attribute>
Expand All @@ -216,6 +220,7 @@
</define>
<define name="Testament-Title">
<element name="latexSEbible:Testament-Title">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H1</value>
</attribute>
Expand All @@ -230,6 +235,7 @@
</define>
<define name="Book">
<element name="latexSEbible:Book">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -253,6 +259,7 @@
</define>
<define name="Book-Title">
<element name="latexSEbible:Book-Title">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H2</value>
</attribute>
Expand All @@ -267,6 +274,7 @@
</define>
<define name="BChapter">
<element name="latexSEbible:Chapter">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -292,6 +300,7 @@
</define>
<define name="Chapter-Title">
<element name="latexSEbible:Chapter-Title">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H3</value>
</attribute>
Expand All @@ -311,6 +320,7 @@
</define>
<define name="Bverse">
<element name="latexSEbible:verse">
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>P</value>
</attribute>
Expand Down Expand Up @@ -343,6 +353,9 @@
<optional>
<attribute name="rolemapped-from"/>
</optional>
<optional>
<attribute name="referenced-as"/>
</optional>
</define>
<!--
Standard Attribute Owner Namespaces (such as CSS3, HTML-5.00) apart from the ones listed here
Expand Down
13 changes: 12 additions & 1 deletion project-examples/scripts/latex-document17.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,19 @@ H6 |= element latexSEbook:subparagraph {attribute rolemaps-to {"H6"}, sechead.c
# LaTeX Bible Markup Namepace

Sect |= element latexSEbible:Frontmatter {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Frontmatter-Title,TOC?,text-unit*}

Sect |= element latexSEbible:Testament {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Testament-Title,TOC?,text-unit*,Book*}

Testament = element latexSEbible:Testament {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Testament-Title,
Expand All @@ -82,20 +85,23 @@ Testament = element latexSEbible:Testament {
}

Frontmatter-Title = element latexSEbible:Frontmatter-Title {
showtags-attributes,
attribute rolemaps-to {"H1"},
attribute id {text}?,
attribute title {text},
Span*
}

Testament-Title = element latexSEbible:Testament-Title {
showtags-attributes,
attribute rolemaps-to {"H1"},
attribute id {text}?,
attribute title {text},
Span*
}

Book = element latexSEbible:Book {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Book-Title,
Expand All @@ -105,13 +111,15 @@ Book = element latexSEbible:Book {
}

Book-Title = element latexSEbible:Book-Title {
showtags-attributes,
attribute rolemaps-to {"H2"},
attribute id {text}?,
attribute title {text},
Span*
}

BChapter= element latexSEbible:Chapter {
showtags-attributes,
attribute rolemaps-to {"Sect"},
attribute id {text}?,
Chapter-Title?,
Expand All @@ -121,13 +129,15 @@ BChapter= element latexSEbible:Chapter {
}

Chapter-Title = element latexSEbible:Chapter-Title {
showtags-attributes,
attribute rolemaps-to {"H3"},
attribute id {text}?,
attribute title {text}?,
(text|Span)*
}

Bverse= element latexSEbible:verse {
showtags-attributes,
attribute rolemaps-to {"P"},
pdf2-attributes,
(text|text-unit|Span)*
Expand All @@ -147,7 +157,8 @@ pdf2-attributes =

showtags-attributes =
attribute af {"yes" | "no"}?,
attribute rolemapped-from {text}?
attribute rolemapped-from {text}?,
attribute referenced-as {text}?

# Standard Attribute Owner Namespaces (such as CSS3, HTML-5.00) apart from the ones listed here
# and also vendor-specific namespaced attributes are allowed with any name/value.
Expand Down
13 changes: 13 additions & 0 deletions project-examples/scripts/latex-document17.rng
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
<define name="Sect" combine="choice">
<element>
<name ns="">Frontmatter</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -195,6 +196,7 @@
<define name="Sect" combine="choice">
<element>
<name ns="">Testament</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -216,6 +218,7 @@
<define name="Testament">
<element>
<name ns="">Testament</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -240,6 +243,7 @@
<define name="Frontmatter-Title">
<element>
<name ns="">Frontmatter-Title</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H1</value>
</attribute>
Expand All @@ -255,6 +259,7 @@
<define name="Testament-Title">
<element>
<name ns="">Testament-Title</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H1</value>
</attribute>
Expand All @@ -270,6 +275,7 @@
<define name="Book">
<element>
<name ns="">Book</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -294,6 +300,7 @@
<define name="Book-Title">
<element>
<name ns="">Book-Title</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H2</value>
</attribute>
Expand All @@ -309,6 +316,7 @@
<define name="BChapter">
<element>
<name ns="">Chapter</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>Sect</value>
</attribute>
Expand All @@ -335,6 +343,7 @@
<define name="Chapter-Title">
<element>
<name ns="">Chapter-Title</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>H3</value>
</attribute>
Expand All @@ -355,6 +364,7 @@
<define name="Bverse">
<element>
<name ns="">verse</name>
<ref name="showtags-attributes"/>
<attribute name="rolemaps-to">
<value>P</value>
</attribute>
Expand Down Expand Up @@ -387,6 +397,9 @@
<optional>
<attribute name="rolemapped-from"/>
</optional>
<optional>
<attribute name="referenced-as"/>
</optional>
</define>
<!--
Standard Attribute Owner Namespaces (such as CSS3, HTML-5.00) apart from the ones listed here
Expand Down

0 comments on commit eda07fa

Please sign in to comment.