Re: [xsl] How Do I Generate A Set-Difference With Context - Part A

Subject: Re: [xsl] How Do I Generate A Set-Difference With Context - Part A
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Sun, 13 Mar 2005 17:53:01 +0000
This is confusing:

There is no "text" attribute with value "aa" in the two xml documents.

It's true that nobody's replied to the first post until now. I didn't, because I didn't find a complete and clear description of the problem -- one has to put some effort in specifying a problem in precise manner, this is a logical pre-condition for people being able to help.

Additionally, if performance is to be optimised, this requires that
real (or at least realistic) input files are included.

Dimitre Novatchev.

Uhhh, rats, I missed that and at least 2 typos (though I can't find them now for the life of me :-). So sorry!

Here are the revised feed files. Lets assume the @id attribute on each story is unique. Again, the following applies to the latter question in . That is, I'm intertested in a technique to generate final.xml in 1 pass.

feed1.xml ====== <feed> <story @id="1" @date="1" text="a"/> <story @id="2" @date="2" text="a"/> </feed>

feed2.xml ====== <feed> <story @id="1" @date="1" text="a"/> <story @id="2" @date="2" text="a"/> <story @id="3" @date="1" text="b"/> </feed>

If feed2.xml were the "current" feed, and feed1.xml the prior one, I want to end up with the following, in 1 pass. Note that <story @id="1".../> is passed through, though unchanged, because abother story with the same @date, <story @id="3" @date="1".../>, is new.

<story @id="1" @date="1" text="a"/>
<story @id="3" @date="1" text="b"/>

I hope I've provided sufficient context and detail. I'm desisting posting code because it's voluminous (there's little to pare down); I shall should anybofy feel it'll help.

Thank you.


Express yourself instantly with MSN Messenger! Download today - it's FREE!

Current Thread