[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xalan:nodeset
Hi Guys,
thanks a lot for the replies. >J.Pietschmann wrote: > >The real question is: why do you actually create the "contexts" >variable as RTF? You should be able to do the following, without >the nodeset() extension: > > <xsl:param name="contextID" select="policy:context/@rdf:resource"/> > <xsl:variable name="contexts"//constraint:SimpleConstriant[@rdf:ID > = $contextID]"/> > > <xsl:for-each select="$contexts"> > <xsl:value-of select="@rdf:ID"/> > </xsl:for-each>
Joe wrote:
anyways by now I am gonna leave it as is. Does anyone know of a good XSL IDE/Editor for Linux? emacs, vi and even X-based text editors are not good enough to detect the typos. thanks, -Nima On 11/26/06, Joe Fawcett <joefawcett@xxxxxxxxxxx> wrote: >From: "J.Pietschmann" <j3322ptm@xxxxxxxx> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >Subject: Re: xalan:nodeset >Date: Sun, 26 Nov 2006 13:56:32 +0100 > >Nima Kaviani wrote: >>I have the following XML file: >[snip] >>and I have used the following construct to store some of the elements >>in a variable based on an equality between the values of the >>attributes: >> >><xsl:param name="contextID" select="policy:context/@rdf:resource"/> >><xsl:variable name="contexts"> >> <xsl:copy-of select="//constraint:SimpleConstriant[@rdf:ID = >>$contextID]"/> >></xsl:variable> >> >>apparantly the variable "contexts" has stored the relevant information >>but when I try to read it, using for-each or whatever else, nothing is >>displayed. so the code below is not working: >> >><xsl:for-each select="xalan:nodeset($contexts)"> >> <xsl:value-of select="constraint:SimpleConstriant/@rdf:ID"/> >></xsl:for-each> >> >>while <xsl:copy-of select="xalan:nodeset$contexts)"/> shows that the >>desired values are stored in the variable. > >Selecting from a RTF-converted-nodeset can be tricky, however it looks >like that the context elements in the for-each are already the >constraint:SimpleConstriant elements, and you can just select the >necessary attribute. > >The real question is: why do you actually create the "contexts" >variable as RTF? You should be able to do the following, without >the nodeset() extension: > > <xsl:param name="contextID" select="policy:context/@rdf:resource"/> > <xsl:variable name="contexts"//constraint:SimpleConstriant[@rdf:ID > = $contextID]"/> > > <xsl:for-each select="$contexts"> > <xsl:value-of select="@rdf:ID"/> > </xsl:for-each> > > >J.Pietschmann > Small typo in your answer :)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|