• 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

XSL

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone tell me what the meaning of the following lines are? Do you know which web sites have documents on those special XPath?
Thanks in advance!
(1)<xsl:template match="*[*]">
(2)<xsl:template match="*[not(*)]">
[ August 05, 2002: Message edited by: Amy Howard ]
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Based on several tests of mine *[not(*)] matches only leaf elements, while *[*] matches any element on the tree except leaf elements.
Cheers,
Dan
 
Amy Howard
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! Dan. I found the following link has some information on XPath, but doesn't include the commands I want to learn.
http://www.topxml.com/xsl/XPathRef.asp
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Amy,
'XML in a nutshell' page 157 says - "Predicates that indicate node sets are true if the node set is nonempty and false if it's empty".
The Xpath expression *[*] selects elements that match the predicate [*]. On leaf elements [*] returns false and therefore *[*] won't match any node when the context node is a leaf element.
*[not(*)] is obviously the opposite.
Cheers,
Dan
 
Amy Howard
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks! Dan
 
reply
    Bookmark Topic Watch Topic
  • New Topic