• 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

What "Select " does ?

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have thorough understanding of XML only. Now a days i am practicing with XSL issues. I just really confuse whether the use of "Select" attribte in <xsl:element> tag is to select some thing or go forward for next element tag.
Plz help me out.
Raheel.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
select attribute used to specify the XPath value where you want to get the item from. Item may be an element likes "/rootElement/subElement", attribute likes "/rootElement/subElement/@color" or grous of attributes likes "/rootElement/subElement/@*" or expression likes "/rootElement/subElement[@color = 'blue']".
It specification depends on the XSL tag that you are using.
<xsl:value-of select="..."/>
<xsl:for-each select="...">
...
</xsl:for-each>
<xsl:element select="..."/>
<xsl:apply-attributes select="..."/>
better understand to XSL, here is a good tutorial.
http://www.xfront.com/xsl.html
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A select attribute allows you to specify, via an XPath expression, a node set to be processed by a given XSLT command. Without a select attribute, the command will be applied to all "direct children" of the current node being processed, which may not be what you want.
ZVon.org has a really good tutorial on XPath:
http://www.zvon.org/index.php?nav_id=10
Once you understand how to describe a set of nodes with an XPath expression, XSLT becomes much easier and more flexible to use.
 
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic