Different XPath query behaviors when using xslCompiledTransform

  • Thread starter Thread starter wejiv
  • Start date Start date
W

wejiv

When I use xslCompiledTransform() or xslCompiledTransform(false) I find that
the XPath queries in my select query attributes do not recognize any
attributes inthe xml document. But when I enable debugging
-xslCompiledTransform(true)- everything works as it should.
for example:
<Root>
<test attr1="avalue" />
<test attr1="anothervalue" />
</Root>
doing a
<xsl:for-each select="/Root/test">
<xsl:sort select="@attr1" />
</xsl:for-each >
will sort using xslCompiledTransform(true) but not
xslCompiledTransform(false). The problem is the select="@attr1" returns
attribute values in debugging mode but not in run mode. I am using Visual
Studio 2005 with .NET Framework 2.0 SP1 for an IIS web solution on Windows XP
SP2.
 
wejiv said:
When I use xslCompiledTransform() or xslCompiledTransform(false) I find that
the XPath queries in my select query attributes do not recognize any
attributes inthe xml document. But when I enable debugging
-xslCompiledTransform(true)- everything works as it should.
for example:
<Root>
<test attr1="avalue" />
<test attr1="anothervalue" />
</Root>
doing a
<xsl:for-each select="/Root/test">
<xsl:sort select="@attr1" />
</xsl:for-each >
will sort using xslCompiledTransform(true) but not
xslCompiledTransform(false). The problem is the select="@attr1" returns
attribute values in debugging mode but not in run mode. I am using Visual
Studio 2005 with .NET Framework 2.0 SP1 for an IIS web solution on Windows XP
SP2.

Please don't multipost.

I've answered in the XSL group.
 
Back
Top