Altova Mailing List Archives
>xsl-list Archive Home
>Recent entries
>Thread Prev -
>Thread Next - [xsl] Re: Wrapping two different elements in parent element - part two
[xsl] Wrapping two different elements in parent element - part two
To:
Date: 10/13/2007 11:55:00 AM
Hello,
As you may have read in my previous post I am working on transforming
really unbelievably unstructured xml export from a dictionary
application into a well formed xml document (based on TEI
recommendations). Thanx to George & Vladimir I have solved (I mean they
have solved) my problem. But I have found some exports that have
slightly different structure but this difference is making things more
difficult.Also my boss has change the desirable outcome to some extend.
So this is what I have and what I'm hoping to get.
What I have:(Export)
<something>
<word_case>N</word_case>
<word_form>some_word_N</word_form>
<word_case>G</word_case>
<word_form>some_word_G</word_form>
<word_case>D</word_case>
<word_form>some_word_D</word_form>
<!-- THIS IS THE PROBLEM-->
<word_number>pl.</word_number>
<word_case>N</word_case>
<word_form>some_word_N</word_form>
<word_case>G</word_case>
<word_form>some_word_G</word_form>
<word_case>D</word_case>
<word_form>some_word_D</word_form>
</something>
What I'm hoping to get:
<something_else>
<form>
<case>N</case>
<orth>some_word_N</orth>
<number>sg.</number>
</form>
<form>
<case>G</case>
<orth>some_word_G</orth>
<number>sg.</number>
</form>
<form>
<case>D</case>
<orth>some_word_D</orth>
<number>sg.</number>
</form>
<form>
<case>N</case>
<orth>some_word_N</orth>
<number>pl.</number>
</form>
<form>
<case>G</case>
<orth>some_word_G</orth>
<number>pl.</number>
</form>
<form>
<case>D</case>
<orth>some_word_D</orth>
<number>sg</number>
</form>
</something_else>
As you can see the transformation should stop at
"<word_number>pl.</word_number>" and change the "<number>" to pl. or
different transformation to start at that point?
I would really appreciate if someone could solve this.
Thank you all in advance
Best regards
Best regards
BrunoDisclaimer
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

