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