xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Bourget <dbour...@videotron.ca>
Subject Re: XSLT problem . . .
Date Fri, 07 Apr 2000 22:28:12 GMT
Hi Peter,

You will find more information on upcoming features for XSLT in the
specification (see the w3c site) or James Clark`s home page

If I was you I would probably convert the files to a more structured format,
relying on a strong hiearchy. You'll not necessarily get significantly
smaller files (you only save on linking elements, after all), but at least
you'll have something more understandable and expressive on which to invent
on-the-fly applications, like with stylesheets. When you are stuck reading
plain text (this is almost what you have to do right now) you dont get the
real advantages of XML.. this is my opinion :)

Nevertheless, I have thought of a way you could have achieved your work with
XSLT. Here's the trick : You order the elements, for examples by their
/group child. Then you call a template on each (using the for-each
instruction) and you always pass as a parameter the value of /group for the
previous element in your loop to the template, in this case it would be the
value of /group. When the template is called on a node which /group is not
equals to the $group parameter it received, it can assume that it is now
processing a new group and can close the other one.  This is a kind of
tricky application that is better done programmaticaly, but it is feasible..
I tend to wrap my stylesheets in scripting applications for this purpose.
Note that you could also inline the inner template, for even simpler code in

Just to satisfy my curiousity, did you or your corporation had to pay the
10K$ fee to get access to RossettaNet DTDs ? I was interestered by it but
when they mentioned the fees I ran away :)


> Thanks for your response.  In your previous eMail you mentioned that there
> might be a feature in a future version of XSLT that will may do what I'm
> looking for.  I've done this programmatically via the DOM.  I was hoping
> there might be a way with a XSLT stylesheet, although doing this with Java
> code is an adequate design also.  The files I'm working with are very
> and have complicated XML tree structures (most of the corresponding DTDs
> from the RosettaNet framework).  I thought normalizing the XML documents
> coming out of our databases would result in much smaller XML files.  I
> just leave the XML documents in the denormalized form since these
> still preserve the same information and can still be validated.
> Peter

View raw message