Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions handlers/default-types.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<xsl:element name="input">
<xsl:attribute name="type">
<!-- primive type determines the input element type -->
<!-- primitive type determines the input element type -->
<xsl:choose>
<xsl:when test="$type = 'string' or $type = 'normalizedstring' or $type = 'token' or $type = 'language'">
<xsl:text>text</xsl:text>
Expand Down Expand Up @@ -86,7 +86,7 @@
<xsl:text>this.setAttribute("value", "</xsl:text><xsl:call-template name="get-duration-info"><xsl:with-param name="type">prefix</xsl:with-param><xsl:with-param name="pattern" select="$pattern" /></xsl:call-template>".concat(this.value).concat("<xsl:call-template name="get-duration-info"><xsl:with-param name="type">abbreviation</xsl:with-param><xsl:with-param name="pattern" select="$pattern" /></xsl:call-template><xsl:text>")); this.previousElementSibling.textContent = this.value;</xsl:text>
</xsl:when>
<xsl:otherwise> <!-- Use value if otherwise -->
<xsl:text>if (this.value) { this.setAttribute("value", this.value</xsl:text><xsl:if test="$whitespace = 'replace'">.replace(/\s/g, " ")</xsl:if><xsl:if test="$whitespace = 'collapse'">.replace(/\s+/g, " ").trim()</xsl:if><xsl:text>); } else { this.removeAttribute("value"); };</xsl:text>
<xsl:text>if (this.value) { this.setAttribute("value", this.value</xsl:text><xsl:if test="$whitespace = 'replace'">.replace(/\s/g, " ")</xsl:if><xsl:if test="$whitespace = 'collapse'">.replace(/\s+/g, " ").trim()</xsl:if><xsl:text>); } else { this.removeAttribute("value"); };</xsl:text><xsl:if test="$type = 'id'"> updateIdentifiers();</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Expand Down Expand Up @@ -194,4 +194,4 @@
</xsl:element>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>
4 changes: 2 additions & 2 deletions handlers/simple-elements.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<xsl:with-param name="reference">handle-simple-element</xsl:with-param>
</xsl:call-template>

<xsl:variable name="type"> <!-- holds the primive type (xs:*) with which the element type will be determined -->
<xsl:variable name="type"> <!-- holds the primitive type (xs:*) with which the element type will be determined -->
<xsl:call-template name="get-suffix">
<xsl:with-param name="string">
<xsl:call-template name="get-primitive-type">
Expand Down Expand Up @@ -322,4 +322,4 @@
</xsl:element>
</xsl:template>

</xsl:stylesheet>
</xsl:stylesheet>