Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Gobiraj Vadivelrajan
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)?
 
Ron Newman
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic