Subject: RE: [xsl] Working with QNames in strings in XSLT 2.0 From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 9 Sep 2008 09:36:39 +0100 |
If your code is schema-aware and the mode attribute is defined in the schema as being of type QName, then you don't need to do anything: atomizing the attribute automatically gives you a QName, so you can write <xsl:template match="foo[@mode=QName('a:blip')]" xmlns:a="urn:item-namespace-1.0"> If it's not schema-aware, then you need to convert the value to a QName, which you can do using <xsl:template match="foo[resolve-QName(@mode,.)=xs:QName('z:blip')]" xmlns:z="urn:item-namespace-1.0"> > My best guess (which doesn't work) is: > > <xsl:template match="foo[resolve-QName(@mode,.) = > QName('urn:item-namespace-1.0','blip')]"> I can't see anything obviously wrong with this. Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Working with QNames in st, Andrew Welch | Thread | [xsl] NaN, Sathasivam, Elayaraj |
Re: [xsl] xslt function, David Carlisle | Date | Re: [xsl] Namespace de-duplication , Andrew Welch |
Month |