Created
February 5, 2018 17:26
-
-
Save ghukill/a9c5852ccd94d1475d3bb6eb23e3ac49 to your computer and use it in GitHub Desktop.
Recursive allow hack for RELAX NG
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<grammar | |
xmlns="http://relaxng.org/ns/structure/1.0" | |
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" | |
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"> | |
<start> | |
<choice> | |
<ref name="any_content"/> | |
</choice> | |
</start> | |
<!-- This is a strange little group of definitions that allow for anything recusively downsteam --> | |
<define name="any_content"> | |
<interleave> | |
<zeroOrMore> | |
<ref name="any_element"/> | |
</zeroOrMore> | |
<text/> | |
</interleave> | |
</define> | |
<define name="any_element"> | |
<element> | |
<anyName/> | |
<zeroOrMore> | |
<ref name="any_attribute"/> | |
</zeroOrMore> | |
<zeroOrMore> | |
<ref name="any_content"/> | |
</zeroOrMore> | |
</element> | |
</define> | |
<define name="any_attribute"> | |
<attribute> | |
<anyName/> | |
</attribute> | |
</define> | |
</grammar> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment