• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

difference between rtf and nodeset

 
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
What is the difference between Result Tree Fragment (RTF) and a nodeset?
My perception is RTF is a set of nodes in user defined tags like -
<mytag>
<value/>
<value/>
</mytag>
and nodeset is the set of nodes got from the input doc itself.
Is this correct?
Thanks in advance
Tina
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is correct.
Result tree fragment is the fifth data type XSLT's adds to XPath's four data types (boolean, number, string and node-set). It is treated as a string by all XSLT elements except <xsl:copy-of>, which see it as a node-set. Practically it means that you cannot "generate" XML dynamically in your XSLT out of strings and then query it, it still be treated as string. You can only add your hand-made markup to the output.
The new version of XSLT specification (2.0) removed this limitation and the result tree fragment is now first class citizen - you can query it as a node-set.
 
Tina Desai
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh.. great.. does that mean there will be no need to take such RTFs in a variable when we need to traverse through it?
Thank you
Tina
 
My favorite is a chocolate cupcake with white frosting and tiny ad sprinkles.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic