|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: building a hierarchical classification out of flat
Many Thanks to David, Michael and Mukul for three different solutions of the problem! I needed some time to understand how each of them approaches the problem but i think now i got it. Unfortunately none of them does the job for my real data, but this is mainly blamed to my dull example. Sorry for that. Davids approach works with the sample data, but in my real data there is no consistent sequence of numbers inside the names of the tags that you could use to "count" the level. So although it is a very nice approach, the "$level+1"-mechanism doesn't work for me. Mukuls approach has the assumption that the last "document" has the deepest level of tags. But sadly this is not true in my case. My example is from a classification, so after the "<document><tag1>3</tag1>..." there will be a "<document><tag1>4</tag1>..." and so on, which makes this approach not suitable for this kind of data. Michaels approach seems to be the most general solution, but i couldn't get it to work. First i added an "x" as the root of my example file. Then i changed the match attribute to "x/document" and erased the "s" of "deep-equals". When i run this with saxon, i get a list of errors, beginning with "Exception in thread 'Thread-25' java.lang.StackOverflowError at net.sf.saxon.functions.DeepEqual.deepEquals(DeepEqual.java:186)". But i won't surrender :-) and if i find a solution i will post it here. Many thanks, Georg
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







