Skip to content

Instantly share code, notes, and snippets.

@dmj
Created March 8, 2023 13:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmj/7015324e49215a4631896ea37c4e8624 to your computer and use it in GitHub Desktop.
Save dmj/7015324e49215a4631896ea37c4e8624 to your computer and use it in GitHub Desktop.
attDef/datatype/dataRef
<?xml version="1.0" encoding="utf-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:tei="http://www.tei-c.org/ns/1.0"
xmlns:teix="http://www.tei-c.org/ns/Examples"
xmlns:xlink="http://www.w3.org/1999/xlink"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.tei-c.org/ns/1.0"><!--
Schema generated from ODD source 2023-03-08T13:44:40Z. .
TEI Edition: Version 4.4.0. Last updated on
19th April 2022, revision ff9cc28b0
TEI Edition Location: https://www.tei-c.org/Vault/P5/Version 4.4.0/
--><!---->
<sch:ns xmlns:sch="http://purl.oclc.org/dsdl/schematron"
prefix="tei"
uri="http://www.tei-c.org/ns/1.0"/>
<define name="outermost">
<element name="outermost">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<ref name="element"/>
</element>
</define>
<define name="element">
<element name="element">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<empty/>
<optional>
<attribute name="attribute">
<a:documentation xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"/>
<data type="string"/>
</attribute>
</optional>
<empty/>
</element>
</define>
<start>
<choice>
<ref name="outermost"/>
</choice>
</start>
</grammar>
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0"
xmlns:rng="http://relaxng.org/ns/structure/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Title</title>
</titleStmt>
<publicationStmt>
<p>Publication Information</p>
</publicationStmt>
<sourceDesc>
<p>Information about the source</p>
</sourceDesc>
</fileDesc>
</teiHeader>
<text>
<body>
<schemaSpec ident="schema" start="outermost">
<dataSpec ident="text">
<content>
<dataRef name="string"/>
</content>
</dataSpec>
<elementSpec ident="outermost">
<content>
<elementRef key="element"/>
</content>
</elementSpec>
<elementSpec ident="element">
<content>
<empty/>
</content>
<attList>
<attDef ident="attribute">
<datatype maxOccurs="1">
<dataRef key="text"/>
</datatype>
</attDef>
</attList>
</elementSpec>
</schemaSpec>
</body>
</text>
</TEI>
<?xml version="1.0" encoding="UTF-8"?>
<rng:grammar datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
xmlns:rng="http://relaxng.org/ns/structure/1.0"
xmlns="http://www.tei-c.org/ns/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:teix="http://www.tei-c.org/ns/Examples"
xmlns:atop="http://www.tei-c.org/ns/atop"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
<rng:start>
<rng:choice>
<rng:ref name="outermost"/>
</rng:choice>
</rng:start>
<rng:define name="text">
<rng:data type="string"/>
</rng:define>
<rng:define name="outermost">
<rng:element name="outermost"
ns="http://www.tei-c.org/ns/1.0">
<rng:ref name="element"/>
</rng:element>
</rng:define>
<rng:define name="element">
<rng:element name="element"
ns="http://www.tei-c.org/ns/1.0">
<rng:empty/>
<rng:group>
<rng:optional>
<rng:attribute name="attribute"
ns="">
<rng:list>
<rng:data type="string"/>
</rng:list>
</rng:attribute>
</rng:optional>
</rng:group>
</rng:element>
</rng:define>
</rng:grammar>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment