Skip to content

Commit

Permalink
Merge pull request #328 from cellar-wg/non-empty-namespace
Browse files Browse the repository at this point in the history
Non empty namespace
  • Loading branch information
dericed authored Jul 22, 2019
2 parents f6b04ba + 927956a commit d585ce3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ebml_matroska.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<EBMLSchema docType="matroska" version="4">
<EBMLSchema docType="matroska" version="4" xmlns="https://ietf.org/cellar/ebml">
<!-- constraints on EBML Header Elements -->
<element name="EBMLMaxIDLength" path="1*1(\EBML\EBMLMaxIDLength)" id="0x42F2" minOccurs="1" maxOccurs="1" range="4" default="4" type="uinteger"/>
<element name="EBMLMaxSizeLength" path="1*1(\EBML\EBMLMaxSizeLength)" id="0x42F3" minOccurs="1" maxOccurs="1" range="1-8" default="8" type="uinteger"/>
Expand Down
13 changes: 7 additions & 6 deletions transforms/ebml_schema2html.xsl
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:ebml="https://ietf.org/cellar/ebml" exclude-result-prefixes="ebml">
<xsl:output encoding="UTF-8" method="xml" version="1.0" indent="yes"/>
<xsl:template match="EBMLSchema">
<xsl:template match="ebml:EBMLSchema">
<html>
<style>
.techdef table{
Expand Down Expand Up @@ -74,12 +75,12 @@
<th>Version</th>
<th>Description</th>
</tr>
<xsl:apply-templates select="//element"/>
<xsl:apply-templates select="//ebml:element"/>
</table>
</div>
</html>
</xsl:template>
<xsl:template match="element">
<xsl:template match="ebml:element">
<tr class="level{@level}">
<td>
<xsl:value-of select="@name"/>
Expand Down Expand Up @@ -131,12 +132,12 @@
<xsl:value-of select="@maxver"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="//EBMLSchema/@version"/>
<xsl:value-of select="//ebml:EBMLSchema/@version"/>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="documentation"/>
<xsl:value-of select="ebml:documentation"/>
</td>
</tr>
</xsl:template>
Expand Down
20 changes: 10 additions & 10 deletions transforms/ebml_schema2markdown4rfc.xsl
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:str="http://exslt.org/strings">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:str="http://exslt.org/strings" xmlns:ebml="https://ietf.org/cellar/ebml" >
<xsl:output encoding="UTF-8" method="text" version="1.0" indent="yes" />
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:template match="EBMLSchema">
<xsl:apply-templates select="//element"/>
<xsl:template match="ebml:EBMLSchema">
<xsl:apply-templates select="//ebml:element"/>
</xsl:template>
<xsl:template match="element">
<xsl:template match="ebml:element">
<xsl:choose>
<xsl:when test="contains(@path,'\EBML\')">
<xsl:text>##</xsl:text>
Expand Down Expand Up @@ -88,7 +88,7 @@
<xsl:value-of select="@maxver"/>
<xsl:text>`&#xa;&#xa;</xsl:text>
</xsl:if>
<xsl:for-each select="documentation">
<xsl:for-each select="ebml:documentation">
<xsl:choose>
<xsl:when test="@type">
<xsl:value-of select="@type"/>
Expand All @@ -99,26 +99,26 @@
<xsl:value-of select="."/>
<xsl:text>&#xa;&#xa;</xsl:text>
</xsl:for-each>
<xsl:for-each select="restriction">
<xsl:for-each select="ebml:restriction">
<xsl:text>restrictions:&#xa;&#xa;</xsl:text>
<xsl:choose>
<xsl:when test="enum/documentation">
<xsl:when test="ebml:enum/ebml:documentation">
<xsl:text>|value|label|documentation|&#xa;</xsl:text>
<xsl:text>|:---|:---|:---|&#xa;</xsl:text>
<xsl:for-each select="enum">
<xsl:for-each select="ebml:enum">
<xsl:text>|`</xsl:text>
<xsl:value-of select="@value"/>
<xsl:text>` |</xsl:text>
<xsl:value-of select="@label"/>
<xsl:text> |</xsl:text>
<xsl:value-of select="documentation"/>
<xsl:value-of select="ebml:documentation"/>
<xsl:text> |&#xa;</xsl:text>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:text>|value|label|&#xa;</xsl:text>
<xsl:text>|:---|:---|&#xa;</xsl:text>
<xsl:for-each select="enum">
<xsl:for-each select="ebml:enum">
<xsl:text>|`</xsl:text>
<xsl:value-of select="@value"/>
<xsl:text>` |</xsl:text>
Expand Down

0 comments on commit d585ce3

Please sign in to comment.