[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Still thinking to object oriented...

Subject: Re: Still thinking to object oriented...
From: "Jonas Bassl" <Jonas@xxxxxxxx>
Date: Mon, 29 Sep 2008 15:23:15 +0200
Re:  Still thinking to object oriented...
yes, i am sorry. That was my mistake, of course, node_b shouldn't
appear in the output. But can you please post your solution as a hole
here, because i don't really know what you mean in the dotted area and
if i try your example like i understood it, than there is a huge
output which is not what i want.

<xsl:template match="/">
:(??)
<xsl:value-of
   select="//*[descendant-or-self::*[contains(name(),'to_search')]]/name()"
   separator="&#10;"/>
</xsl:template>
</xsl:stylesheet>

Regards,
Jonas

2008/9/29 David Carlisle <davidc@xxxxxxxxx>:
>
>> I want to search for all nodes which for this example contain the
>> phrase "to_search" and than i want to ascend from the found node
>> accross the ancestor-or-self axis to output every parent but in the
>> order as they appear in the xml sourc
>
> well that sounds like
>
>
> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
> <xsl:template match="/">
> :
> <xsl:value-of
>    select="//*[descendant-or-self::*[contains(name(),'to_search')]]/name()"
>    separator="&#10;"/>
> </xsl:template>
> </xsl:stylesheet>
>
>
> but that doesn't produce your requested output, it produces
>
>
> $ saxon9 nodesearch.xml nodesearch.xsl
> <?xml version="1.0" encoding="UTF-8"?>
> :
> node_a
> node_c
> node_d
> node_c
> node_e
> node_c
> node_i
> node_c
> node_l
> node_c
> node_v
> node_d
> node_c
> node_q
> node_c
> node_d
> node_u
> node_c
> node_l
> node_c
> node_d
> node_c
> node_l
> node_c
> node_i
> node_to_search_1
> node_c
> node_s
> node_c
> node_d
> node_c
> node_to_search_2
>
>
>
> you requested node_b but that has no descendant "search" node so I
> don't see why it should be output?
>
>
>
> David
>
> ________________________________________________________________________
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
>
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> ________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.