By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,501 Members | 1,690 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,501 IT Pros & Developers. It's quick & easy.

XSLTransform class cannot handle QNames

P: n/a
I have an XSL transform that tries to set the schema definition of the root
attribute as follows:

<xsl:template match="CR">
<xsl:element name="CR">
<xsl:attribute
name="xmlns:xsi"><xsl:text>http://www.w3.org/2001/XMLSchema-instance</xsl:te
xt></xsl:attribute>
<xsl:attribute
name="xsi:noNamespaceSchemaLocation"><xsl:text>CR. xsd</xsl:text></xsl:attrib
ute>
....

This works fine with the Xalan processor, but generates an error using the
..NET XslTransform class. I think this is a discretionary behavior of
Microsoft's XSL engine as described in
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconimplementationofdiscretionarybehaviorsinxsltr ansformclass.asp :

Problem: The name attribute in xsl:attribute and xsl:element generated from
an attribute value template is not a valid QName.

Behavior: Exception thrown
Can anyone recommend a work-around? Is there a simple way to handle the
exception for just these attributes?

Thx,

Tim
Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.