[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Wrapping two different elements in parent element - pa

Subject: Wrapping two different elements in parent element - part two
From: Bruno Nahod <bnahod@xxxxxxx>
Date: Sat, 13 Oct 2007 13:53:59 +0200
 Wrapping two different elements in parent element - pa
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
Bruno

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.