Oxygen XML Editor
 
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Wrapping two different elements in parent element.


Subject: [xsl] Wrapping two different elements in parent element.
From: Bruno Nahod <bnahod@xxxxxxx>
Date: Fri, 28 Sep 2007 13:00:10 +0200

Hello,

Im working on transforming xml export from a dictionary application; witch is unbelievably unstructured into a well formed xml document (based on TEI recommendations). My biggest problem is how to wrap two (or more) elements into parent element. This is the simplified example of what I have and what Im hoping to get;

This I have (export)

<?xml version="1.0" encoding="UTF-8"?>

<something>

<word_case>N</word_case>

<word_form>some_word_N</word_form>

<word>G</word_case>

<word>some_word_G</word_form>

<word_case>D</word_case>

<word>some_word_D</word_form>

</something>

This I hope to get;

<?xml version="1.0" encoding="UTF-8"?>

<something_else>

<usg>

<form>

<case>N</case>

<orth>some_word_N</orth>

</form>

<form>

<case>G</case>

<orth>some_word_G</orth>

</form>

<form>

<case>D</case>

<orth>some_word_D</orth>

</form>

</usg>

</something_else>

Thank you very much

Bruno.


Current Thread
 
© 2002-2008 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy
This website was created & generated with <oXygen/> XML Editor
Keywords