From: Joseph L. <jl...@cr...> - 2005-10-20 16:20:43
|
I wondered if you had a chance to look at this issue yet? I've been running into this problem with a number of different transforms: they run fine using transform.exe, or through Saxon with JAXP, but return incorrect results applied in code in a .net class. In most cases, the issue seems to be that the processor is treating <xsl:value-of statements in the manner of xslt 1.0 - i.e., selecting the first match in the sequence, and dumping the rest. =20 I'd be glad to start trying to find out what's causing this in the Saxon.net source, but before I begin looking in that direction, I'd like to be certain I'm not just invoking the transformer incorrectly. =20 Thanks, Joe Levine =20 ________________________________ From: sax...@li... [mailto:sax...@li...] On Behalf Of M. David Peterson Sent: Tuesday, October 11, 2005 6:24 PM To: sax...@li... Subject: Re: [Saxondotnet-help] differences between saxon, saxon.net? =20 Hi Joe, I am right smack dab in the middle of trying to meet a deadline but as soon as I am finished I will look into this and get back to you later this evening. Cheers :) On 10/11/05, Joseph Levine <jl...@cr...> wrote: I'm having trouble figuring out why the following transform works as I expected it to in Saxon invoked by JAXP, and from the Saxon.net command line, but produces different results when invoked from an Asp.net application: =20 Here's the xslt in question - the url is http://www2.turffiles.ncsu.edu/ContentManagement/CMXml/TestTransform.xsl =20 <xsl:template match=3D"PropertyGroupSet"> =20 <xsl:variable name=3D"fieldNames"> <xsl:value-of select=3D"Property/Name" separator=3D","></xsl:value-of> </xsl:variable> =20 <xsl:value-of select=3D"$fieldNames"></xsl:value-of> <xsl:choose> <xsl:when test=3D"Property/IsSingleValueProperty=3D0"> =20 <br></br> <fieldset> <xsl:call-template name=3D"multipleValues"/> <legend> <xsl:value-of select=3D"@Name" /> <img class=3D"groupOptions" = src=3D"http://www.turffiles.ncsu.edu/images/fwd.gif" onclick=3D"ShowPossibilities(event,{@PropertyID},true,'{$fieldNames}')" = /> </legend> <xsl:call-template name=3D"formItem"/> </fieldset> </xsl:when> <xsl:otherwise> <xsl:call-template name=3D"formItem"/> <img class=3D"Options" src=3D"http://www.turffiles.ncsu.edu/images/fwd.gif" onclick=3D"ShowPossibilities(event,{Property/PropertyID},false,'{$fieldNa= m es}')" /> =20 </xsl:otherwise> </xsl:choose> =20 </xsl:template> =20 The source document is at http://www2.turffiles.ncsu.edu/ContentManagement/CMXml/TestProps.xml =20 The relevant section is the following PropertyGroupSet node with 2 name descendants: =20 <PropertyGroupSet Name=3D"Author" PropertyID=3D"17"> <Property> <PropertyID>5</PropertyID> <Name>LastName</Name> <FriendlyName>Last Name</FriendlyName> <Type>String</Type> <IsUnique>false</IsUnique> <IsSingleValueProperty>0</IsSingleValueProperty> <PropertyGroupSet>Author</PropertyGroupSet> </Property> <Property> <PropertyID>6</PropertyID> <Name>FirstName</Name> <FriendlyName>First Name</FriendlyName> <Type>String</Type> <IsUnique>false</IsUnique> <IsSingleValueProperty>0</IsSingleValueProperty> <PropertyGroupSet>Author</PropertyGroupSet> </Property> </PropertyGroupSet> =20 I expect that the $fieldNames variable will select both Name nodes in this group; instead, it only selects the first of these. More oddly still, the xpath expression count(Property/Name) correctly returns the value 2 here. Property/Name[2] returns 'FirstName', as I expect it to. Is there an error in my xslt that I'm not seeing? Or is this an issue in Saxon.Net? As I said, this works fine from the command line for both Saxon and Saxon.net, and invoked by jaxp in java. =20 On a somewhat related issue: I also had trouble with a couple of other xpath functions: node-name() and distinct-values() both seemed to choke the saxon.net processor, at least when I tried them. =20 Thanks, Joe Levine =20 =20 --=20 <M:D/> M. David Peterson http://www.xsltblog.com/=20 |