on 09-07-2006 12:33 PM
Hello everybody,
as far as i know (and tested) the SORT-function sorts just the node. The subnodes are not sorted.
Sample:
<B>
<BField_1>
<BField_2>
<A>
<AField_1>
<AField_2>
<u>after using the SORT:</u>
<A>
<<b>B</b>Field_1>
<<b>B</b>Field_2>
<B>
<<b>A</b>Field_1>
<<b>A</b>Field_2>
<u>what I want:</u>
<A>
<AField_1>
<AField_2>
<B>
<BField_1>
<BField_2>
Thanks, Regards
Mario
Hi Mario,
if nothing else works: xsl:sort is sorting <b>WITH</b> subnodes.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mario,
i can understand you very good. I had that problem serveral times, a difficult task in message mapping or manually work in XSL.
One trick: download the xsd from the imported IDoc and put it into XML Spy where you have a function for creating a instance. Copy that xml into the stylesheet / template. So you have the not dynamical parts with less work.
Regards,
Udo
Hi Udo,
Danke vorab.
1) My first problem is: I did some transformations from XML to HTML, cause all tutorials you find on the internet are xml -> html
In this special case (xml -> html), i see that the xml-<tags> get lost!
Could you tell me, how this behaves by a xml -> xml (better xsd -> xsd) mapping?
2) Is it possible to generate a xsl, that maps all source fields to target fields 1:1. Because this is the most work to do
Regards Mario
Hi Mario
xml -> xml: take xsl:stylesheet subelement "xsl:output" for control (method="xml")
xsd -> xsd: not possible. You need a instance for a mapping (should be clear as you dont have field values)
map all source fields to target fields 1:1: take xsl:copy-of. Use attribute select. Put there a X-Path expression, for example '/', what means everything (but why do you use a mapping at all??)
The copy-of command is very strong as you can copy well selected parts of your source message with very less code, just a little bit X-Path.
Regards,
Udo
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.