xsl-list
[Top] [All Lists]

Re: [xsl] How to give an attribute a QName value, with the appropriate prefix?

2012-08-27 15:52:01
Ok, next try:

<xsl:attribute name="type" select="concat(prefix-from-QName(node-name(.)), ':anySimpleType')" />

Input:

<foo xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <xsd:attribute name="test">bar</xsd:attribute>
</foo>

Output:

<foo xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
  <xsd:attribute name="test" type="xsd:anySimpleType">bar</xsd:attribute>
</foo>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--