[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Cannot use result tree fragment
When people write <xsl:variable name="x"> <xsl:value-of select="ABCD"/> </xsl:variable> they nearly always should be writing <xsl:variable name="x" select="ABCD"/> Sometimes the only effect of doing it the first way is that it runs slower. Sometimes the effect is that it doesn't work at all. You have copied the string value of the document into a text node. The elements have disappeared, so even if XSLT 1.0 didn't have restrictions on using result tree fragments, your path expression would find nothing. Michael Kay > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of abbouh > Sent: 18 June 2003 17:29 > To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx > Subject: Cannot use result tree fragment > > > i want to get all "ht" nodes from different external documents,so i > use in my xsl file: > > <xsl:for-each select="//doccontent/chapmod"> > <xsl:variable name="vchapmod" select="current()"/> > <xsl:variable name="vchapmod1"> > <xsl:value-of > select="document(concat(string($vchapmod/attribute::docref),'. > xml'))"/> > </xsl:variable> > <xsl:for-each select="$vchapmod1//ht"> > > but i get this error : > Error in Xpath expression,Cannot use result tree fragment > the error is for <xsl:for-each select="$vchapmod1//ht"> > > why , and any other suggestion > Thanks > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|