xsl-list
[Top] [All Lists]

RE: RE: tansforming an XML into another XML help needed !

2005-04-20 23:56:02
Hello,


The example I provided is a simplified version of the xml that focus on
the problem.  I have hundreds of real sources, their structure might be
slightly different but the principle remains the same.

In attach you'll find 2 "sample" xml and the stylesheet.
But the stylesheet is really dirty and it's not working at 100% yet
The main problem is that it's not recursive, I only parse 3 levels
(meaning if there are more embedded elements it will not work).

If you consider the XML as a tree, all the items that have a name
attribute that ends with _XX (_EN, _NL, _FR) are always leaves (cannot
contain a "sub-item").  

The ones that don't end with _XX (PageName, DateOn, Paragraph,
Content...) might contain other items or might be leaves.

If they are leaves they should go in "common" if not, it's part of the
structure that should be reproduiced in the output (see my first mail).

Sorry for the "dirty" example but I started learning XSL only 2 days
ago.


Regards,
Pierre.


--- cknell(_at_)onebox(_dot_)com wrote:
Asking the correct question will not necessarily get you the correct
answer. Unfortunately, asking the wrong question will certainly get
you the wrong answer. If the example source document you provided
does not adequately represent your real source document, try
supplying the real source document and the desired output. If you
have a stylesheet that almost works, then supply the stylesheet and
tell us where you have a problem.
-- 
Charles Knell
cknell(_at_)onebox(_dot_)com - email


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--