• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

Why ancestor-or-self doesn't wotk with root node

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this input XML

Associated XSL
[
I get the output as

I was thinking that "self" also includes the root
node (Here it is catalog)?
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The root element (in this case, <catalog> ) is not the same thing as the root node.
The root element is a child of the root node. If you have processing instructions at the top level, they will also be children of the root node.
Try changing
match="/"
to
match="catalog".
[ December 29, 2002: Message edited by: Ron Newman ]
    Bookmark Topic Watch Topic
  • New Topic