-2

str: prefix とはどういう意味ですか? mycsharpextmethod のすぐ前にあります

<xsl:template name="name1">
        <xsl:param name="text" select="." />
        <xsl:value-of disable-output-escaping="yes" select="str:mycsharpextmethod($text)" />
    </xsl:template>
4

1 に答える 1

0

Without seeing the whole document, I would guess that it is a namespace reference (so as to avoid conflicts with any other methods named mycsharpextmethod). From the W3 Namespaces in XML 1.0 Spec (emphasis mine):

In XML documents conforming to this specification, some names (constructs corresponding to the nonterminal Name) MUST be given as qualified names...The Prefix provides the namespace prefix part of the qualified name, and MUST be associated with a namespace URI reference in a namespace declaration. The LocalPart provides the local part of the qualified name.

As an (slightly unrelated) example, the EXSLT String Library uses the str: prefix to properly namespace any string-related functions.

于 2013-04-10T17:38:07.407 に答える