[Bug 5343] [XQX] Problem with {{ and }} in a Namespace Declaration Attribute

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5343





------- Comment #1 from andrew.eisenberg@us.ibm.com  2008-01-04 16:30 -------
This could be solved by changing the template for xqx:namespaceDeclaration
from:

  <xsl:template match="xqx:namespaceDeclaration">
    <xsl:text> xmlns</xsl:text>
    <xsl:if test="xqx:prefix">
      <xsl:text>:</xsl:text>
      <xsl:value-of select="xqx:prefix"/>
    </xsl:if>
    <xsl:value-of select="$EQUAL"/>
    <xsl:call-template name="quote">
      <xsl:with-param name="item" select="xqx:uri"/>
    </xsl:call-template>
  </xsl:template>


to the following:

  <xsl:template match="xqx:namespaceDeclaration">
    <xsl:text> xmlns</xsl:text>
    <xsl:if test="xqx:prefix">
      <xsl:text>:</xsl:text>
      <xsl:value-of select="xqx:prefix"/>
    </xsl:if>
    <xsl:value-of select="$EQUAL"/>
    <xsl:call-template name="quote">
                  <xsl:with-param name="item">
                    <xsl:call-template name="globalReplace">
                      <xsl:with-param name="stringToBeFixed">
                        <xsl:call-template name="globalReplace">
                          <xsl:with-param name="stringToBeFixed">
                            <xsl:value-of select="xqx:uri"/>
                          </xsl:with-param>
                          <xsl:with-param
name="toBeReplaced"><xsl:text>{</xsl:text></xsl:with-param>
                          <xsl:with-param
name="replacement"><xsl:text>{{</xsl:text></xsl:with-param>
                        </xsl:call-template>
                      </xsl:with-param>
                      <xsl:with-param
name="toBeReplaced"><xsl:text>}</xsl:text></xsl:with-param>
                      <xsl:with-param
name="replacement"><xsl:text>}}</xsl:text></xsl:with-param>
                    </xsl:call-template>
                  </xsl:with-param>
    </xsl:call-template>
  </xsl:template>

Received on Friday, 4 January 2008 16:30:59 UTC