-2

What does str: prefix mean? It's right in front of mycsharpextmethod

<xsl:template name="name1">
        <xsl:param name="text" select="." />
        <xsl:value-of disable-output-escaping="yes" select="str:mycsharpextmethod($text)" />
    </xsl:template>
Brian Rasmussen
  • 114,645
  • 34
  • 221
  • 317
Rod
  • 14,529
  • 31
  • 118
  • 230

1 Answers1

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.

ABach
  • 3,743
  • 5
  • 25
  • 33
  • @CodeCaster - that isn't correct. The `select` attribute of an `` element is perfectly capable of handling a namespace reference as part of its value. – ABach Apr 10 '13 at 17:57
  • I can only find that the `select` attribute must contain an [expression](http://www.w3.org/TR/xpath-30/#prod-xpath30-Expr), which makes no mention of namespaces. But I'm no expert in the XSLT field so I retracted my comment, perhaps I'm overseeing something, because for example in [this answer](http://stackoverflow.com/a/284145/266143) it is mentioned. – CodeCaster Apr 10 '13 at 18:07
  • 1
    @CodeCaster - take a look at this SO question/answer for some more info: http://stackoverflow.com/questions/2585533/xsl-and-namespaces – ABach Apr 10 '13 at 18:56