ONYX - 9.0 - Utilisation - Traitements XSL/en
Différence entre versions
(Page créée avec « To use XSL Transformation from the Mapping rules engine (Workflow), you need to use a CMD box and call the M-XSLTransform program using the command below: [%PATH_BIN%]/M-... ») |
(Page créée avec « <u>XML generated (showing only Article groups for improved readability)</u>: ») |
||
(23 révisions intermédiaires par le même utilisateur non affichées) | |||
Ligne 41 : | Ligne 41 : | ||
===Designer=== | ===Designer=== | ||
− | + | XSL Transformation sheets can also be called directly from within Designer. The advantage over using the Workflow is the native integration in Designer as the XSL sheet helps to customize the document (sorting lines, deleting lines, adding lines, managing widows and orphans, etc.) and is fully integrated into the Designer template. | |
− | + | To do this, copy and paste the content of the XSLT sheet into the '''XML Pre-processing''' window in Designer between the '''#xsltransform;''' and '''#endxsltransform;''' tags | |
− | <u> | + | <u>Syntax</u>:<br> |
<nowiki>#xsltransform;</nowiki><br> | <nowiki>#xsltransform;</nowiki><br> | ||
− | //'' | + | //''XSLT sheet content''<br> |
<nowiki>#endxsltransform;</nowiki> | <nowiki>#endxsltransform;</nowiki> | ||
Ligne 53 : | Ligne 53 : | ||
[[Fichier:OX D XLS 1.jpg|vignette|450x450px|alt=|néant]] | [[Fichier:OX D XLS 1.jpg|vignette|450x450px|alt=|néant]] | ||
− | == | + | ==Sample XSLT Sheets== |
− | + | As we usually transform an XMLDRAW file into another XMLDRAW file, you can create sample XSLT templates with specific functionality: | |
− | + | The content below is based on a simple input data stream. Different examples highlight the differences with the "generic shell" that explain how the expected results are produced. | |
− | === | + | ===Generic shell - Simple copy of the input datastream=== |
− | + | This example has no function in itself (because there is no point in applying an XSL transformation process if no change is made to the data stream) but will be used in all subsequent examples as the generic data stream. | |
<span style="color:green"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <span style="color:green"><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 71 : | Ligne 71 : | ||
<span style="color:green"></xsl:stylesheet></span> | <span style="color:green"></xsl:stylesheet></span> | ||
− | <u> | + | <u>Hint:</u><br> |
− | <span style="color:green"> | + | <span style="color:green">XSL sheet header</span><br> |
− | <span style="color:red">template | + | <span style="color:red">Simple copy template</span> |
− | === | + | ===Deleting lines from a group=== |
− | + | This example deletes the lines of type '''info_remise''' and '''info_compo''' from all '''article''' groups in the document. | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 92 : | Ligne 92 : | ||
</xsl:stylesheet> | </xsl:stylesheet> | ||
− | === | + | ===Adding a first and last line to a group=== |
− | ==== | + | ====In all groups==== |
− | + | This example adds a start line (first_line) and an end line (last_line) to all groups in the input file. | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 114 : | Ligne 114 : | ||
</xsl:stylesheet> | </xsl:stylesheet> | ||
− | ==== | + | ====In a specific group - Article==== |
− | + | This example adds a start line (first_line) and an end line (last_line) only to the Article group(s) of the file. | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 134 : | Ligne 134 : | ||
</xsl:stylesheet> | </xsl:stylesheet> | ||
− | === | + | ===Deleting all groups: group1=== |
− | + | This example deletes all group1 groups (found in /doc/page) from the file. | |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 149 : | Ligne 149 : | ||
</xsl:stylesheet> | </xsl:stylesheet> | ||
− | === | + | ===Sorting the lines of group1 groups in descending order=== |
− | + | This example sorts all the lines in group1 in descending order based on the ''name'' attribute | |
− | <u> | + | <u>XSLT sheet</u>: |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
Ligne 174 : | Ligne 174 : | ||
</xsl:stylesheet> | </xsl:stylesheet> | ||
− | <u> | + | <u>Sample input XML file :</u> |
<doc> | <doc> | ||
Ligne 207 : | Ligne 207 : | ||
</doc> | </doc> | ||
− | <u> | + | <u>Generated output data stream</u>: |
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
Ligne 240 : | Ligne 240 : | ||
</doc> | </doc> | ||
− | === | + | ===Sorting, rearranging, grouping lines=== |
− | + | This example:<br> | |
− | <span style="color:red"> - | + | <span style="color:red"> - Sorts info_livraison lines in Article groups in alphabetical ascending order based on the Date_LivConf field<br></span> |
− | <span style="color:green"> - | + | <span style="color:green"> - Shows the other lines in the Article group in a given order: Info_livraison, then info_article, then info_remise, then info_compo and finally all lines starting with a size value<br></span> |
− | <span style="color:orange"> - | + | <span style="color:orange"> - Writes the info_livraison line only if the value of its date_LivConf field is different from the previous info_livraison line<br></span> |
− | <u> | + | <u>XSLT sheet:</u> |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" exclude-result- | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" exclude-result- | ||
Ligne 299 : | Ligne 299 : | ||
− | <u> | + | <u>Sample input XML file (showing only Article groups to improve readability)</u>: |
<group name="Article"> | <group name="Article"> | ||
Ligne 305 : | Ligne 305 : | ||
<field name="Date_LivDem">2ème Qz Septembre 2014</field> | <field name="Date_LivDem">2ème Qz Septembre 2014</field> | ||
<field name="Sem_LivDem">39</field> | <field name="Sem_LivDem">39</field> | ||
− | <span style="color:red"><field name="Date_LivConf">'''20181020'''</field> // | + | <span style="color:red"><field name="Date_LivConf">'''20181020'''</field> //this line is sorted by Date_LivConf</span> |
<field name="Sem_LivConf">39</field> | <field name="Sem_LivConf">39</field> | ||
</line> | </line> | ||
Ligne 312 : | Ligne 312 : | ||
<field name="Designation"><![CDATA[HOLDEN Blanc]]></field> | <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> | ||
</line> | </line> | ||
− | <span style="color:green">// | + | <span style="color:green">//the 2 lines are in reverse order as the XSL template shows info_remise before |
info_compo</span> | info_compo</span> | ||
<span style="color:green"><line name="info_compo"> | <span style="color:green"><line name="info_compo"> | ||
Ligne 327 : | Ligne 327 : | ||
</group> | </group> | ||
<group name="Article"> | <group name="Article"> | ||
− | <span style="color:orange">// | + | <span style="color:orange">//this line is not displayed as the value of Date_LivConf in the previous info_livraison line is the same |
(20181020) | (20181020) | ||
<line name="info_livraison"> | <line name="info_livraison"> | ||
Ligne 339 : | Ligne 339 : | ||
<field name="Designation"><![CDATA[HOLDEN Blanc]]></field> | <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> | ||
</line> | </line> | ||
− | <span style="color:green">// | + | <span style="color:green">//the 2 lines are in reverse order as the XSL template shows info_remise before |
info_compo</span> | info_compo</span> | ||
<span style="color:green"><line name="info_compo"> | <span style="color:green"><line name="info_compo"> | ||
Ligne 357 : | Ligne 357 : | ||
<field name="Date_LivDem">2ème Qz Septembre 2014</field> | <field name="Date_LivDem">2ème Qz Septembre 2014</field> | ||
<field name="Sem_LivDem">39</field> | <field name="Sem_LivDem">39</field> | ||
− | <span style="color:red"><field name="Date_LivConf">20190101</field> // | + | <span style="color:red"><field name="Date_LivConf">20190101</field> //this line is sorted by Date_LivConf</span> |
− | |||
<field name="Sem_LivConf">39</field> | <field name="Sem_LivConf">39</field> | ||
</line> | </line> | ||
Ligne 378 : | Ligne 377 : | ||
<field name="Date_LivDem">2ème Qz Septembre 2014</field> | <field name="Date_LivDem">2ème Qz Septembre 2014</field> | ||
<field name="Sem_LivDem">39</field> | <field name="Sem_LivDem">39</field> | ||
− | <span style="color:red"><field name="Date_LivConf">20160101</field> // | + | <span style="color:red"><field name="Date_LivConf">20160101</field> //this line is sorted by Date_LivConf</span> |
− | |||
<field name="Sem_LivConf">39</field> | <field name="Sem_LivConf">39</field> | ||
</line> | </line> | ||
Ligne 403 : | Ligne 401 : | ||
− | <u>XML | + | <u>XML generated (showing only Article groups for improved readability)</u>: |
<group name="Article"> | <group name="Article"> |
Version actuelle datée du 11 décembre 2019 à 15:19
Sommaire
- 1 Introduction
- 2 Principles
- 3 Benefits
- 4 Calls
- 5 Sample XSLT Sheets
Introduction
This page covers the basic principles of XSLT (eXtensible Stylesheet Language Transformations). Mapping will not support XSLT files developed by its users (customers or partners).
Principles
Mapping Onyx introduces support for XSLT so the user can edit the structure of an XML file.
The transformations can be called directly and natively from within Designer, or natively from the rules engine using a specific box in a Workflow.
This feature is new in Onyx and enables the user to modify an XMLDRAW data stream (see details below in Benefits).
Benefits
The main benefit of this new feature is the ability to process a generic input data stream while keeping a customized output data stream.
You can easily edit the input data stream processed by Mapping without making any changes to the program it is generated from. For any given document, you can (among others):
- Filter information
- Sort table rows
- Manage widows and orphans (line blocks that must be on the same page)
- Add information to simplify design
- Convert date formats
Calls
There are two ways to call XSLT sheets:
Workflow
To use XSL Transformation from the Mapping rules engine (Workflow), you need to use a CMD box and call the M-XSLTransform program using the command below:
[%PATH_BIN%]/M-XSLTransform "[%MAP_FILE_IN%]" "[%PATH_XSL%]/MyXSLsheet.xsl" "[%MAP_FILE_OUT%]"
Supported variables:
- PATH_BIN: path to the folder containing Mapping binaries (Applications folder under Onyx Windows or Bin under Onyx Linux)
- PATH_XSL: path to the folder containing XSL sheets
- MAP_FILE_IN: path + name of the infile specified in the workflow's box
- MAP_FILE_OUT: path + name of the outfile specified in the workflow's box
Designer
XSL Transformation sheets can also be called directly from within Designer. The advantage over using the Workflow is the native integration in Designer as the XSL sheet helps to customize the document (sorting lines, deleting lines, adding lines, managing widows and orphans, etc.) and is fully integrated into the Designer template.
To do this, copy and paste the content of the XSLT sheet into the XML Pre-processing window in Designer between the #xsltransform; and #endxsltransform; tags
Syntax:
#xsltransform;
//XSLT sheet content
#endxsltransform;
Sample XSLT Sheets
As we usually transform an XMLDRAW file into another XMLDRAW file, you can create sample XSLT templates with specific functionality:
The content below is based on a simple input data stream. Different examples highlight the differences with the "generic shell" that explain how the expected results are produced.
Generic shell - Simple copy of the input datastream
This example has no function in itself (because there is no point in applying an XSL transformation process if no change is made to the data stream) but will be used in all subsequent examples as the generic data stream.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:stylesheet>
Hint:
XSL sheet header
Simple copy template
Deleting lines from a group
This example deletes the lines of type info_remise and info_compo from all article groups in the document.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="/doc/page/group[@name='Article']/line[@name='info_remise']"/> <xsl:template match="/doc/page/group[@name='Article']/line[@name='info_compo']"/> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Adding a first and last line to a group
In all groups
This example adds a start line (first_line) and an end line (last_line) to all groups in the input file.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="group"> <xsl:copy> <xsl:apply-templates select="@*"/> <line name="first_line"/> <xsl:apply-templates/> <line name="last_line"/> </xsl:copy> </xsl:template> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
In a specific group - Article
This example adds a start line (first_line) and an end line (last_line) only to the Article group(s) of the file.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="group[@name='Article']"> <group name="Article"> <line name="first_line"/> <xsl:apply-templates/> <line name="last_line"/> </group> </xsl:template> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Deleting all groups: group1
This example deletes all group1 groups (found in /doc/page) from the file.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="/doc/page/group[@name='group1']"/> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Sorting the lines of group1 groups in descending order
This example sorts all the lines in group1 in descending order based on the name attribute
XSLT sheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0" exclude-result-prefixes="xsl fo xs fn"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="/doc/page/group[@name='group1']"> <xsl:copy> <xsl:apply-templates select="@*"/> <xsl:apply-templates> <xsl:sort select="./@name" data-type="text" order="descending"/> </xsl:apply-templates> </xsl:copy> </xsl:template> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Sample input XML file :
<doc> <page> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> <group name="group1"> <line name="line1"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line2"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line3"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> </group> <group name="group2"> <line name="line1"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line2"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> </group> </page> </doc>
Generated output data stream:
<?xml version="1.0" encoding="utf-8"?> <doc> <page> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> <group name="group1"> <line name="line3"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line2"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line1"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> </group> <group name="group2"> <line name="line1"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> <line name="line2"> <field name="field1">ValueField1</field> <field name="field2">ValueField2</field> </line> </page> </doc>
Sorting, rearranging, grouping lines
This example:
- Sorts info_livraison lines in Article groups in alphabetical ascending order based on the Date_LivConf field
- Shows the other lines in the Article group in a given order: Info_livraison, then info_article, then info_remise, then info_compo and finally all lines starting with a size value
- Writes the info_livraison line only if the value of its date_LivConf field is different from the previous info_livraison line
XSLT sheet:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0" exclude-result- prefixes="xsl xs"> <xsl:output method="xml" encoding="utf-8" indent="yes" omit-xml-declaration="no" cdata-section-elements="field"/> <xsl:template match="/doc/page"> <page> <xsl:apply-templates select="*[not(self::group[@name='Article'])]"/> <xsl:apply-templates select="group[@name='Article']"> <xsl:sort select="line[@name='info_livraison']/field[@name='Date_LivConf']" data-type="text" order="ascending"/> </xsl:apply-templates> </page> </xsl:template> <xsl:template match="group[@name='Article']"> <group name="Article"> <xsl:if test="not(preceding-sibling::group[@name='Article']/line[@name='info_livraison']/field[@name='Date_LivConf'] = ./line[@name='info_livraison']/field[@name='Date_LivConf'])"> <xsl:apply-templates select="./line[@name='info_livraison']"/> </xsl:if> <xsl:apply-templates select="./line[@name='info_article']"/> <xsl:apply-templates select="./line[@name='info_remise']"/> <xsl:apply-templates select="./line[@name='info_compo']"/> <xsl:apply-templates select="./line[starts-with(@name, 'tailles')]"> <xsl:sort select="@name" data-type="text" order="ascending"/> </xsl:apply-templates> </group> </xsl:template> <xsl:template match="@*|*|comment()"> <xsl:copy> <xsl:apply-templates select="@*|*|text()|comment()|processing-instruction()"/> </xsl:copy> </xsl:template> </xsl:stylesheet>
Sample input XML file (showing only Article groups to improve readability):
<group name="Article"> <line name="info_livraison"> <field name="Date_LivDem">2ème Qz Septembre 2014</field> <field name="Sem_LivDem">39</field> <field name="Date_LivConf">20181020</field> //this line is sorted by Date_LivConf <field name="Sem_LivConf">39</field> </line> <line name="info_article"> <field name="Reference">HOLDEN734</field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> //the 2 lines are in reverse order as the XSL template shows info_remise before info_compo <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="info_remise"> <field name="Remise_Totale_Ligne">5</field> </line> <line name="tailles_1"> <field name="Qte">20</field> <field name="Unt_Oeuvre">U</field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> //this line is not displayed as the value of Date_LivConf in the previous info_livraison line is the same (20181020) <line name="info_livraison"> <field name="Date_LivDem">2ème Qz Septembre 2014</field> <field name="Sem_LivDem">39</field> <field name="Date_LivConf">20181020</field> <field name="Sem_LivConf">39</field> </line> <line name="info_article"> <field name="Reference">HOLDEN734</field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> //the 2 lines are in reverse order as the XSL template shows info_remise before info_compo <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="info_remise"> <field name="Remise_Totale_Ligne">5,5</field> </line> <line name="tailles_1"> <field name="Qte">20</field> <field name="Unt_Oeuvre">U</field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> <line name="info_livraison"> <field name="Date_LivDem">2ème Qz Septembre 2014</field> <field name="Sem_LivDem">39</field> <field name="Date_LivConf">20190101</field> //this line is sorted by Date_LivConf <field name="Sem_LivConf">39</field> </line> <line name="info_article"> <field name="Reference">HOLDEN734</field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte">20</field> <field name="Unt_Oeuvre">U</field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> <line name="info_livraison"> <field name="Date_LivDem">2ème Qz Septembre 2014</field> <field name="Sem_LivDem">39</field> <field name="Date_LivConf">20160101</field> //this line is sorted by Date_LivConf <field name="Sem_LivConf">39</field> </line> <line name="info_article"> <field name="Reference">HOLDEN734</field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte">20</field> <field name="Unt_Oeuvre">U</field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> <line name="tailles_2"> <field name="Qte">2</field> <field name="Unt_Oeuvre">U</field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group>
XML generated (showing only Article groups for improved readability):
<group name="Article"> <line name="info_livraison"> <field name="Date_LivDem"><![CDATA[2ème Qz Septembre 2014]]></field> <field name="Sem_LivDem"><![CDATA[39]]></field> <field name="Date_LivConf"><![CDATA[20160101]]></field> <field name="Sem_LivConf"><![CDATA[39]]></field> </line> <line name="info_article"> <field name="Reference"><![CDATA[HOLDEN734]]></field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte"><![CDATA[20]]></field> <field name="Unt_Oeuvre"><![CDATA[U]]></field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> <line name="tailles_2"> <field name="Qte"><![CDATA[2]]></field> <field name="Unt_Oeuvre"><![CDATA[U]]></field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> <line name="info_livraison"> <field name="Date_LivDem"><![CDATA[2ème Qz Septembre 2014]]></field> <field name="Sem_LivDem"><![CDATA[39]]></field> <field name="Date_LivConf"><![CDATA[20181020]]></field> <field name="Sem_LivConf"><![CDATA[39]]></field> </line> <line name="info_article"> <field name="Reference"><![CDATA[HOLDEN734]]></field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_remise"><field name="Remise_Totale_Ligne"><![CDATA[5]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte"><![CDATA[20]]></field> <field name="Unt_Oeuvre"><![CDATA[U]]></field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> <line name="info_article"> <field name="Reference"><![CDATA[HOLDEN734]]></field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_remise"> <field name="Remise_Totale_Ligne"><![CDATA[5,5]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte"><![CDATA[20]]></field> <field name="Unt_Oeuvre"><![CDATA[U]]></field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group> <group name="Article"> <line name="info_livraison"> <field name="Date_LivDem"><![CDATA[2ème Qz Septembre 2014]]></field> <field name="Sem_LivDem"><![CDATA[39]]></field> <field name="Date_LivConf"><![CDATA[20190101]]></field> <field name="Sem_LivConf"><![CDATA[39]]></field> </line> <line name="info_article"> <field name="Reference"><![CDATA[HOLDEN734]]></field> <field name="Designation"><![CDATA[HOLDEN Blanc]]></field> </line> <line name="info_compo"> <field name="Composition"><![CDATA[98% Polyester-2% Coton]]></field> </line> <line name="tailles_1"> <field name="Qte"><![CDATA[20]]></field> <field name="Unt_Oeuvre"><![CDATA[U]]></field> <field name="Lib_Unt_Oeuvre"><![CDATA[Unité(s)]]></field> </line> </group>