Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic