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

Re: Creating intermediate XML fragment

Subject: Re: Creating intermediate XML fragment
From: "alexandre bord" <alexandre.bord@xxxxxxxxxx>
Date: Wed, 18 Sep 2002 17:51:22 +0200
intermediate bord
Of course
i'm sorry not to have explained it .
The rules are
(0) @name = name1 = @ name2
(1) print foobar/@name if it is not ( in bar/@name1 or in bar/@name2 or in foo/@name)
(2) print bar/@name1 if it is not in foo/@name
(2') print bar/@name2 if it is not in foo/@name
(3) Don't print foo/@name


It's your second guess (i think)
Thanks once more for your help

alex

Peter Davis wrote:

On Wednesday 18 September 2002 02:05, alexandre bord wrote:


Hello !
Suppose my (piece of) xml looks like this :
<foobar name="fff" />
<foobar name="dddd" />
<bar name1="dddd" name2="xxx"/>
<bar name1="xxx" name2="yyy"
<foo name="yyy" />
<foo name="zzz" />



No need for an intermediate fragment. This is a simple grouping problem, just with the additional complexity of the different meanings of the different elements.


I'm a little confused on your logic though.



I'd like to output :
fff
dddd (once)
xxx (once)
(not 'yyy' nor 'zzz')



Let me try and guess the rules:


* For <foobar> elements, output @name if it is the first of (foobar/@name|bar/@name1|bar/@name2) with the given value.

* For <bar> elements, output @name1 and @name2 if they are the first of (foobar/@name|bar/@name1|bar/@name2) with the given value and if the value is not a value of a foo/@name.

Or, another guess:

* You want to treat foobar/@name, bar/@name1, and bar/@name2 as all the same, and foo/@name is always not output?

I'd be happy to help suggest a solution, but I don't want to waste my time if my guesses are not correct. Can you clarify a little bit?






XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.