Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate MarkupMultiline #10

Open
RS-Credentive opened this issue Dec 16, 2023 · 0 comments
Open

Validate MarkupMultiline #10

RS-Credentive opened this issue Dec 16, 2023 · 0 comments

Comments

@RS-Credentive
Copy link
Owner

https://github.com/usnistgov/metaschema/blob/develop/schema/xml/metaschema-markup-multiline.xsd

<xs:group name="headingBlockElementGroup">
xs:choice
<xs:element name="h1" type="inlineMarkupType"/>
<xs:element name="h2" type="inlineMarkupType"/>
<xs:element name="h3" type="inlineMarkupType"/>
<xs:element name="h4" type="inlineMarkupType"/>
<xs:element name="h5" type="inlineMarkupType"/>
<xs:element name="h6" type="inlineMarkupType"/>
</xs:choice>
</xs:group>

<xs:group name="blockElementGroup">
xs:choice
<xs:group ref="headingBlockElementGroup"/>
<xs:group ref="listsGroup"/>
<xs:group ref="blockTextGroup"/>
<xs:element name="p" type="inlineMarkupType"/>
<xs:element name="table" type="tableType"/>

<xs:element name="img" type="imageType"/>
</xs:choice>
</xs:group>

<xs:group name="blockTextGroup">
xs:choice
<xs:element name="pre" type="preformattedType"/>
<xs:element name="hr"/>

<xs:element name="blockquote" type="blockQuoteType"/>
</xs:choice>
</xs:group>

<xs:complexType name="preformattedType" mixed="true">
xs:complexContent
<xs:extension base="inlineMarkupType">
xs:annotation
xs:documentationThe content model is the same as inlineMarkupType, but line endings need
to be preserved, since this is pre-formatted.</xs:documentation>
</xs:annotation>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="listType">
xs:sequence
<xs:element name="li" type="listItemType" minOccurs="1" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="orderedListType">
xs:complexContent
<xs:extension base="listType">

<xs:attribute name="start" type="xs:nonNegativeInteger"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:group name="listsGroup">
xs:choice
<xs:element name="ul" type="listType"/>
<xs:element name="ol" type="orderedListType"/>
</xs:choice>
</xs:group>

<xs:complexType name="listItemType" mixed="true">

<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="inlineMarkupGroup"/>
<xs:group ref="listsGroup"/>
<xs:group ref="blockTextGroup"/>
<xs:group ref="headingBlockElementGroup"/>
<xs:element name="p" type="inlineMarkupType"/>
</xs:choice>
</xs:complexType>

<xs:complexType name="tableType">
xs:sequence
<xs:element maxOccurs="unbounded" name="tr" type="tableRowType"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="tableRowType">

<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="td" type="tableCellType" maxOccurs="unbounded"/>
<xs:element name="th" type="tableCellType" maxOccurs="unbounded"/>
</xs:choice>
</xs:complexType>

<xs:complexType name="tableCellType" mixed="true">
xs:complexContent

<xs:extension base="inlineMarkupType">

<xs:attribute name="align" type="alignType" default="left"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:simpleType name="alignType">
<xs:restriction base="xs:token">
<xs:enumeration value="left"/>
<xs:enumeration value="center"/>
<xs:enumeration value="right"/>
</xs:restriction>
</xs:simpleType>

<xs:complexType name="blockQuoteType">

<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="blockElementGroup"/>
</xs:choice>
</xs:complexType>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant