This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: problem with flat xml file
- From: "Bryan Rasmussen" <bry at itnisk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 7 Feb 2002 09:36:05 +0100
- Subject: RE: [xsl] problem with flat xml file
- Keywords: xsltDEV
- Reply-to: xsl-list at lists dot mulberrytech dot com
>http://www.dpawson.co.uk/xsl/sect2/flatfile.html
>May give you some clues Bryan.
thanks those are some great examples, wish I'd looked at all these yesterday
morning! I finally solved it but the solution was very ugly, of course the
problem was ugly, most of the file could be easily structured in sort of the
way example number 2 was, but there were these five tags,
CKF, CKF_overskrift, Gruppe, Delmaal, and Trin(ugly names also).
CKF ... /CKF
.....other flat structure tags...
Trin.../Trin
CKF_overskrift .... /CKF_overskrift
Gruppe../Gruppe
Delmaal ../Delmaal
Gruppe../Gruppe
Delmaal../Delmaal
CKF had a text() which was the same as some CKF_overskrift text() with a one
to many relationship.
CKF_overskrift had a one to many relationship with Gruppe and Delmaal, For
each Gruppe there was an answering Delmaal, and once one had the rest of it
structured, each CKF/CKF_overskrift had a Trin it related to.
the result tree had to look like this:
other hierarchical structure up here.
CKF
...other hierarchical structure in here, easy to get.
--TRIN
--Gruppe
--Delmaal../Delmaal
/Gruppe
--Gruppe
--Delmaal../Delmaal
/Gruppe
/Trin
--Trin
...
/CKF
CKF...
.../CKF
I did it, but I had to use saxon:next-in-chain, probably my conceptual
limits, the thing I kept running up against was that it was like several
different types of flat structures in one file, I had to seperate these out,
and then order them. Actually I think I might go through that faq and see if
I can build it simpler, it was bugging me all night thinking out new
algorithms, when I did sleep I had nightmares involving xslt and Rutger
Hauer as a vengeful psycho(he's good at that.).
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list