xslt , How to make multi record join show up in main section


How to make multi record join show up in main section

Question:

Tag: xslt

This is the file coming out:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soapenv:Body>
    <ns1:getDocumentByKeyResponse xmlns:ns1="http://www.taleo.com/ws/integration/toolkit/2005/07" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <Document xmlns="http://www.taleo.com/ws/integration/toolkit/2005/07">
        <Attributes>
          <Attribute name="count">1</Attribute>
          <Attribute name="duration">0:00:00.102</Attribute>
          <Attribute name="entity">Requisition</Attribute>
          <Attribute name="mode">T-XML</Attribute>
          <Attribute name="version">http://www.taleo.com/ws/tee800/2009/01</Attribute>
        </Attributes>
        <Content>
          <ExportTXML xmlns:e="http://www.taleo.com/ws/tee800/2009/01" xmlns="http://www.taleo.com/ws/integration/toolkit/2005/07">
            <e:Requisition>
              <e:ContestNumber>15000005</e:ContestNumber>
              <e:JobInformation>
                <e:JobInformation>
                  <e:OtherLocations>
                    <e:Location>
                      <e:ZipCode>77002</e:ZipCode>
                    </e:Location>
                    <e:Location>
                      <e:ZipCode>77050</e:ZipCode>
                    </e:Location>
                  </e:OtherLocations>
                  <e:PrimaryLocation>
                    <e:Location>
                      <e:ZipCode>77003</e:ZipCode>
                    </e:Location>
                  </e:PrimaryLocation>
                </e:JobInformation>
              </e:JobInformation>
            </e:Requisition>
          </ExportTXML>
        </Content>
      </Document>
    </ns1:getDocumentByKeyResponse>
  </soapenv:Body>
</soapenv:Envelope>

I need it to look like so:

<?xml version="1.0" encoding="UTF-8"?>
<source>
  <job>
    <job_id>
      <![CDATA[15000005]]>
    </job_id>
    <location_zipcode>
      <![CDATA[77002]]>
      <![CDATA[77050]]>    
      <![CDATA[77003]]>
    </location_zipcode>
  </job>
</source>

My current xsl looks like so:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:e="http://www.taleo.com/ws/tee800/2009/01" xmlns:fct="http://www.taleo.com/xsl_functions" exclude-result-prefixes="e fct">
  <xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" cdata-section-elements="job_id location_zipcode other_location_zipcode"/>
  <xsl:param name="OUTBOUND_FOLDER"/>
  <xsl:template match="/">
    <source>
      <xsl:apply-templates select="//e:Requisition"/>
    </source>
  </xsl:template>
  <xsl:template match="e:Requisition">
    <xsl:variable name="location_zipcode" select="e:JobInformation/e:JobInformation/e:PrimaryLocation/e:Location/e:NetworkLocation/e:NetworkLocation/e:ZipCode"/>
    <xsl:variable name="other_location_zipcode" select="e:JobInformation/e:JobInformation/e:OtherLocation/e:Location/e:NetworkLocation/e:NetworkLocation/e:ZipCode"/>
    <xsl:variable name="job_id" select="e:ContestNumber"/>
    <job>
      <job_id>
        <xsl:value-of select="$job_id"/>
      </job_id>
      <location_zipcode>
        <xsl:value-of select="$location_zipcode"/>
        <xsl:value-of select="$other_location_zipcode"/>
      </location_zipcode>
      </job>
      </xsl:template>
      </xsl:stylesheet>

This xslt makes it fail when it comes across more than 1 other location record. I need it to keep pulling however many there are. Any ideas would be most appreciated! Thanks! Greg


Answer:

The following stylesheet:

XSLT 1.0 or 2.0

<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:e="http://www.taleo.com/ws/tee800/2009/01" 
exclude-result-prefixes="e">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

<xsl:template match="/">
    <source>
        <xsl:apply-templates select="//e:Requisition"/>
    </source>
</xsl:template>

<xsl:template match="e:Requisition">
    <job>
        <job_id>
            <xsl:value-of select="e:ContestNumber"/>
        </job_id>
        <location_zipcode>
            <xsl:for-each select="..//e:Location">
                <xsl:text disable-output-escaping="yes">&lt;![CDATA[</xsl:text>
                <xsl:value-of select="e:ZipCode"/>
                <xsl:text disable-output-escaping="yes">]]&gt;</xsl:text>
                <xsl:text>&#10;</xsl:text>
            </xsl:for-each>
        </location_zipcode>
    </job>
</xsl:template>

</xsl:stylesheet>

when applied to your example input (after cleaning up the redundant hyphens!) will return:

<?xml version="1.0" encoding="UTF-8"?>
<source>
   <job>
      <job_id>15000005</job_id>
      <location_zipcode><![CDATA[77002]]>
<![CDATA[77050]]>
<![CDATA[77003]]>
</location_zipcode>
   </job>
</source>

A slightly more efficient version would replace the // shortcuts with full, explicit paths.

I was just about to add a note regarding the CDATA requirement, but Ian Roberts said it much better that I was going to: How to make multi record join show up in main section


Related:


Using XSLT variable in X PATH string


xslt,xslt-2.0
I have an XPath string as follows: /results/server[@name='server1'] I would like to construct a new XPath using a previously defined XSLT variable: /results/server[@name='$server'] I haven't tried 'concat' might be possible with that. I am using XSLT 2.0. XSLT parser complains if I use the string as defined above: XPST0003 XPath...

XSLT for-each statement not iterating proper amount of times


xml,xslt
I am having trouble with my XSLT for-each statements. When I run the XML through the XSLT, it only comes up with the first iteration of the list, and then stops. It doesn't post the values either. Here is the XML code. <?xml version="1.0" encoding="UTF-8"?> <template> <L> <Q>Hey</Q> <Q>There</Q> <Q>Thank...

Transform XML to another XML using XSL based on some condition


xml,xslt
I have an XML - <root> <gereratorList> <generator> <id>1</id> <A>123</A> </generator> <generator> <id>10</id> <A>456</A> </generator> <generator> <id>111</id> <A>789</A> </generator> </gereratorList> </root> I want to transform this XML into another XML through XSL. The resulting XML should be something like this - <parent> <child> <test>456</test> <child> </parent> But I am...

XSLT sort by attribute and attribute value (with exclude)


sorting,xslt,attributes,xslt-1.0,alphabetical
I have a following XML code: <module> <component> <output> <output-test> <exclude-output/> <orderEntry type="specific"/> <orderEntry type="other"/> <orderEntry type="module" module-name="module1"/> <orderEntry type="module" module-name="module3"/> <orderEntry type="module" module-name="module2"/> <orderEntry type="library" name="library1"/> <orderEntry type="library" name="library3"/> <orderEntry type="module" module-name="module4"/> <orderEntry...

Split XML into multiple files using xslt on string length


xml,xslt,xslt-2.0
I'm looking at trying to split an XML file into 2 separate files. They have to be split on the length of a string in a particular element. I've been attempting to use the <xsl:for-each-group> and <xsl:result-document> elements in order to do this but only get the 1st matching 'object'...

apply-templates based on attribute id value


xslt
My XML is as below <?xml version="1.0" encoding="UTF-8"?> <product> <admin id="1"> <name>abc</name> </admin> <admin id="2"> <name>kkk</name> </admin> <product> Here is my XSLT <xsl:template match="product"> <ul> <xsl:apply-templates select="admin"/> </ul> I want to apply templates on "admin" based on attribute id value. How to apply templates based on attribute value? New question......

XSLT filePath with document as variable


variables,xslt,filepath
I try to use a variable in the filePath, but it isn't working: BodyPart filePath="C:\\FileOutEmail\\($vpDocNr).xml" content-type="" content-id="" content-disposition="" multipart-type="" I also tried with the whole path in a variable without results: BodyPart filePath='$bestand' content-type="" content-id="" content-disposition="" multipart-type="" Is this possible, what is the right syntax?...

How to XSLT transform XML nested attribute elements and concatenate name


xml,xslt,transformation,pubmed
I am not savvy with XML/XSLT at all. I'm just trying to learn enough to transform this XML file into something that my Access database can use. The XML data was output in an attribute format and Access only likes the element format. I have the basic transformations down, but...

XSL - iterate through elements and update based on the node index from another xml file


xml,xslt
I have an XML file with multiple Shape elements each with a child Material element that contains a Code attribute. I want to update the Code attribute for each Material element based on a value that is obtained from a separate XML file. The problem I have is that the...

About sorting based on the counting of subelements


xml,xslt
i have an xml document with properties that belong to agencies: <agency name="Century 42" num="Century42" mail="[email protected]"/> <property agency="Century42" ....> ... I would like to print the info of all agencies. The agencies should be sorted by the number of properties that they own. I tried this but it does not...

What match=“/” actually returns?


xslt
What exactly does match="/" returns if we assume we have XML shown below? As far as I can tell it returns some imaginary top level node which has <people> element as its child. What is the type of this node among those 7 types of nodes: element, attribute, text, namespace,...

Math operations in xsl template - XSLTranform geocoordinates from deg to meters


xml,xslt,math
I haven't been able to make this work. I'm trying to make a template for an xsl tranformation of degrees geocoordinates to meters. The function in PHP is like this and works just fine: function degtometers($lon, $lat) { $half_circumference = 20037508.34; $x = round($lon * $half_circumference / 180); $y =...

XSLT get all nodes with text


xml,xslt
I'm trying to loop through all nodes with text in my document from a certain location. <xsl:template name="interpret_text"> <xsl:param name="location"/> <xsl:for-each select="$location//text()"> <xsl:choose> <xsl:when test="name(.) = tag_im_looking_for"> <!-- various code stuff and closing tags --> This code is functional except you may notice my problem. When I enter the for-each...

XQuery XML insert


xml,xslt,xquery,transformation,osb
I have XML based target data: <myTargetData> <myMap> <pairs> <key>KEY_1</key> <value> <myMap> <pairs> <key>INNER_KEY_1</key> <value/> </pairs> <pairs> <key>INNER_KEY_2</key> <value/> </pairs> <pairs> <key>INNER_KEY_3</key> <value> <myMap> <pairs> <key>INNER_INNER_KEY_1</key> <value/> </pairs> <pairs> <key>INNER_INNER_KEY_2</key> <value/>...

XSLT - Put Content by checking attribute


xml,xslt,xslt-2.0
I'm new to XSLT. and I've a xml to xml transformation task. what I have to do is put some xml node to result xml tree by checking some attribute values in original xml file. example : original xml has <doc> <sec id="sec_1" sec-type="scope"> </sec> <sec id="sec_1" sec-type="norm-refs"> </sec> //more...

Is it possible to preprocess xml source within the same XSLT Stylesheet?


xslt,xslt-2.0
Within the same XSLT (2.0) Stylesheet and transformation I would like to: 1) first preprocess the whole XML Datasource (Add a attribute with a specific calculation to certain elements) and then 2: transform the changed XML Datasource with the sylesheet's templates. How can I achieve this? A code example would...

Summing based on matching values XSLT-1.0


xslt,xslt-1.0,xsl-fo
I'm currently trying to work with grouping in XSLT 1.0. I have XML similar to this: <table> <row> <PRODUCER type="VARCHAR" value="PRODUCER 1"/> <PUBLICATION_CODE_-_NAME type="VARCHAR" value="PUBLICATION A"/> <DOMESTIC type="DECIMAL" value="20"/> <FOREIGN type="DECIMAL" value="4"/> </row> <row> <PRODUCER type="VARCHAR" value="PRODUCER 1"/> <PUBLICATION_CODE_-_NAME type="VARCHAR" value="PUBLICATION B"/> <DOMESTIC type="DECIMAL" value="57"/> <FOREIGN type="DECIMAL"...

XSLT insert sibling if it doesn't exist - Not being rerunnable for some reason


xml,xslt,xpath
I'm trying to add a sibling to an element only if it doesn't exist. Here's my XML: <?xml version='1.0' encoding='UTF-8'?> <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator...

XML, XSL namespaces


xml,xslt,namespaces
I'm new to XML especially namespaces. I made all the documents and everything seems to work fine, but I don't know whether I'm really using namespaces (which is requirement). Except that my html file are not valid because off this: "Attribute xmlns:xsi not allowed here." and "Attribute xmlns:xslformatting not allowed...

How to get rid of the '\n' character while reading string from xsl?


java,xslt,xslt-1.0,xsl-fo
I'm reading xsl file using XSLReader class, and one of the columns contains strings but sometimes this string have enter in the (\n), so when I read this and print it I'm printing the string with the \n: those are two addresses, the first one have enter in the xsl...

XSL-FO table-cell with superscript and vertical alignment


html,xml,xslt,xsl-fo
This is the situation: I am converting html to xsl-fo to pdf. I am displaying a heading text like "4.4.1. [Header Text]" by use of a table, because it might happen that the [Header Text] is quite long and in that case shall wrap onto the next line like so:...

Transform XML structure using XSLT


xml,xslt,xpath
I want to transform an XML structure with XSLT. <detaileddescription> <para>Some text</para> <para> <bold>Title</bold> </para> <para>Intro text: <itemizedlist> <listitem> <para>Text</para> </listitem> <listitem> <para>Text</para> </listitem> </itemizedlist> </para> </detaileddescription> This is what I want: <detaileddescription> <para>Some text</para> <List>...

Convert XSL 2.0 count by current-group logic into XSL 1.0 logic


xml,xslt,grouping
I'm a novice with XSL and am trying to summarize some XML data based on grouping of substrings of data. I've been trying to get my head around Muenchian grouping and counting but have not been able to get it to work. I took a look at the XSL 2.0...

XML-XSLT-XPATH : How to convert multiple XML elements to a string, separated by semicolon


xml,xslt,xpath,xslt-2.0
I have just demonstrated my question as an input and output format as below. I have an input as xml document which consist of following data <Users> <user> <name>Mark Curtain</name> <email>[email protected]</email> <username>mark</username> </user> <user> <name>Zuke Gossip</name> <email>[email protected]</email> <username>zuke</username> </user> <user> <name>Villan Kiosk</name> <email>[email protected]</email>...

removing a parent node dependig upon child node using xslt


xml,xslt
i am looking forwar for an template that removes anode from xml depending upon the value of a chid node,basically i am having an xml like: <EventInfo> <AssignmentEvent> <CreateDateTime>2015-06-02T00:00:00+02:00</CreateDateTime> </AssignmentEvent> <EstimateEvent> <CreateDateTime>2015-06-02T07:38:28.0000000Z</CreateDateTime> <CommitDateTime>2015-06-04T14:29:38.0000000Z</CommitDateTime> <UploadDateTime>2015-06-04T14:29:39.7651796Z</UploadDateTime>...

XslCompiledTransform Transform Method Not Working


c#,xml,xslt,transform
I have a below xslt file. <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:gl-bus="http://www.xbrl.org/int/gl/bus/2006-10-25" xmlns:gl-cor="http://www.xbrl.org/int/gl/cor/2006-10-25" xmlns:gl-gen="http://www.xbrl.org/int/gl/gen/2006-10-25" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:link="http://www.xbrl.org/2003/linkbase"...

XSL transformation outputting multiple times and other confusion


xml,xslt,xpath
I'm attempting to transform a section of an XML document (which is mostly HTML) with a templated piece of markup should a particular pattern be matched. I'm inexperienced with XSLT (I've only used xpath, really) and online documentation is sparse so I'm struggling with it... To the following XML document:...

XSLT 1.0 - Multiple Child Nodes Formatted Output


xslt,nodes
I can do this with For-Each but having some problems with Apply_Templates. The XML Data contains varying child nodes but I want to display all child nodes with their parents information. <orders> <order> <customer>1</customer> <items> <item> <name>Widget A</name> <price>10</price> <code>1A</code> </item> </items> </order> <order> <customer>2</customer> <items> <item> <name>Widget A</name>...

Difference between ancestor and ancestor-or-self


xslt,selenium,xpath,selenium-webdriver
I know about ancestor in xpath but what is this ancestor-or-self. when we have to use ancestor-or-self.Please give me any examples.

How to get xml Nodes which are in lower case using XSLT 1.0


xml,xslt,xpath,xslt-1.0
I need to get XML nodes which are in lower case and values of it using XSLT 1.0 and display the output as XML <main> <ACAT>Cat Name A </ACAT> <bcat>Cat Name b </bcat> <ccat>Cat Name c </ccat> <dcat>Cat Name d </dcat> <ECAT>Cat Name E </ECAT> <fcat>Cat Name f </fcat> </main>...

Convert meters to foot in xml data via xsl transformation


xml,xslt,openstreetmap
I would like to modify my xml file by converting some values ([email protected]) from meter to foot. I am a newbie to xml and this should be no problem for one of you. The formular is: 1 meter are 3.2808 feet I want to convert the attribute value of node/[email protected]

XSLT How to remove style from div and td tags


xml,xslt
I am new to XSLT. I got stuck while removing style attributes from div, td or li tags. Input XML: <?xml version="1.0" encoding="UTF-8"?> <div xmlns="http://www.w3.org/1999/xhtml"> <table style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; WIDTH: 606px; BORDER-COLLAPSE: collapse; WORD-WRAP: break-word; TABLE-LAYOUT: fixed; BORDER-TOP: medium none; BORDER-RIGHT: medium none" class="MsoNormalTable msoUcTable" tabIndex="-1" border="1"...

XSLT remove data if attribute value is higher than threshold


xml,xslt,math,operator-keyword,relational
I am newbie to XSLT. My am is to remove elements from XML based on a field if it is higher than some threshold value which I will be getting as parameter to it. My XML is as shown below: <tns:PM objectClass="MyNode" objectName="" className="com.project.converter.PMFamilyConverter" interfaceName="ComponentPM" xmlns:tns="http://www.myproject/SS/PMSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.myProject.com/SS/PM.xsd"> <tns:family desc="family0"...

group siblings by identifying the first node of a certain type in sequence


xml,xslt,xpath
Not sure if that description is the best...but given this xml: <?xml version="1.0"?> <root> <type1 num="1" first="1"/> <type1 num="2" /> <type2 num="3" /> <type2 num="4" /> <type1 num="5" first="2"/> <type1 num="6" /> <type2 num="7" /> <type2 num="8" /> <type1 num="9" first="3"/> <type1 num="10" /> <type2 num="11" /> <type2 num="12" />...

Insert tag if and only if it does not exist


xslt
I would like to do an XSLT transformation on an XML file ensuring that tag <B> is inserted into tag <A> if and only if it is not there. Example: <A>foo</A> should become <A><B>foo</B></A> <A>foo <x>bar</x></A> should become <A><B>foo <x>bar</x></B></A> <A><B>foo</B></A> should remain <A><B>foo</B></A> <A><B>foo <x>bar</x></B></A> should remain...

XSLT to copy value in a node to another across repeating nodes


xml,xslt
very new to XSLT and needs some help in transforming the XML. The below XML can have multiple "row" tags <?xml version="1.0" encoding="UTF-8"?> <ns1:row> <ns1:City>BALTIMORE</ns1:City> <ns1:Miscdata> <ns1:Building> <ns1:VendorCode>123</ns1:VendorCode> <ns1:Value>2</ns1:Value> </ns1:Building> <ns1:Building> <ns1:VendorCode>345</ns1:VendorCode> <ns1:Value>8</ns1:Value> </ns1:Building> </ns1:Miscdata> </ns1:row>...

ProcessBuilder or Runtime.getRuntime().exec won't complete jar execution


java,xml,xslt,cmd,processbuilder
I have a jar which converts one XML to other XML format using XSLT in Java. The jar copies the output to some folder. It is working absolutely fine when am running it on command prompt but running it via Runtime.getRuntime().exec or ProcessBuilder, doesn't complete the process. Just 25 files...

XML to Word using custom paragraph styles and XSLT


xml,xslt,ms-word
I've got an XML file that contains mostly textual information (list of questions in Moodle XML format). I'd like to convert it to a document that can be opened by MS Word, but I'd like to maintain context (using paragraph styles) so I can convert it back to Moodle XML....

XPath Recursive Descent behaves differently between match and select


xslt
Info Why is there different behaviour of Recursive Descent operator between ● template's match attribute where it is ignored and only children are selected ignoring their descendants ● for-each's select attribute where it works properly Two examples of test.xsl are given which both operate on the following test.xml. test.xml <?xml...

List unique values of an attribute within a group only for specific criteria in XSL 1.0


xml,xslt,unique,groups
I need to list the unique values of an attribute in a group, when another attribute has a specific value. Making this work in XSL 1.0 is very tricky to understand. Thanks to another post, I now have the groupings defined to allow me to perform counts when attributes match...

XSL getting out of context using dynamic XPATH


xslt,xpath
I'm trying to reformat an XML I get from an appliance into an HTML table, and it's format is not usual. It use unique references in node name's, like this: /network/content/host/content/REF_1/content /network/content/network/content/REF_2/content and then, it use the same references to another part of the file, as a value of a...

Remove XML Node text using XSLT


xml,xslt,xslt-2.0
I need to modify xml document with XSLT. what I need is to remove some node name from xml document. Example: <link ref="www.facebook.com"> <c type="Hyperlink">www.facebook.com<c> </link> I need to convert this xml as follows (remove the <c> node and attribute form xml), <link ref="www.facebook.com"> www.facebook.com </link> I tried to do...

How to calculate max string-length of a node-set?


xml,xslt,xslt-1.0,libxslt
I am trying to use XSLT to turn an XML document into plain text tables for human consumption. I am using xsltproc, which only implements XSLT 1.0 (so max is from EXSLT actually). I tried the below, but the commented-out definition fails because string-length returns only a single value (the...

Selecting data in XSL from different sections of XML


xml,xslt
I am new to XSLT. I have an XML- <root> <fiberList> <fiber> <A>abcd</A> <B>bcde</B> <C>cdef</C> </fiber> </fiberList> <generatorList> <generator> <D>defg</D> <E>efgh</E> </generator> </root> I want to transform this XML into another XML through XSL. The resulting XML should be something like this- <parent> <child> <M>abcd</M> <N>bcde</N> <O>efgh</O> </child> </parent> But...

Web.config transform Insert as first child


asp.net,xslt
When transforming the web.config, how do I insert a web.config node as the first child of the parent? So I have <configuration> <system.webServer> <rewrite> <rules> <rule name="Foo" stopProcessing="true"> ... </rule> <rule name="Bar" stopProcessing="true"> ... </rule> </rules> </rewrite> </system.webServer> </configuration> And I want to insert another rule as the first rule....

Adding a child attribute to the parent element in xslt 1.0


xml,xslt,xpath,xslt-1.0
I have multiple elements that contain an uniqueId(generated and stored in a variable). I have recursively added the element(object class=Bundle with unique id ) with the xsl as follows <xsl:template match="visualChildren"> <object class="Set" > <installChildren> <xsl:call-template name="Bundle"> <xsl:with-param name="i" select="1"/> <xsl:with-param name="limit" select="4" /> </xsl:call-template> </installChildren> </object> </xsl:template> <xsl:template name="Bundle">...

Check the node is present or not in xslt


xml,xslt
I am new to xslt, Though I manage to work on it. But I struck with one case for which I need a help from expert. I am trying to finding the node which is Exists or not. I already search this same question, in which I didn't get the...

HashMap iteration in XSLT 2.0


java,xml,xslt,xslt-2.0,xsl-fo
I have an HashMap object as part of my java model and when I convert it into XML, this is the result... <transaction> <claims> <remarksMap> <entry> <string>XX</string> <string>Description 1</string> </entry> <entry> <string>YYY</string> <string>Description 2</string> </entry> <entry> <string>ZZZZ</string> <string>Description 3</string> </entry> </remarksMap> </claims> </transaction> I would like to...

xslt condition output one by one


xml,function,xslt,if-statement,xpath
hope that someone has a suggestion about this: I need to have in each 'a', all the 'b' that have @n equal or bigger than the @n of the 'a' in which they are. I am using xslt 2.0 and Saxon-HE 9.6.0.5 XML source: <blabla> <a n="2"></a> <a n="6"></a> <b...

XSLT Sequence Number Generation


java,xslt,xslt-2.0,xslt-grouping
I am preparing one flat file from XMl using XSLT 2.0. My input XML is <city> <family> <parent>A</parent> <child>A1</child> </family> <family> <parent>A</parent> <child>A2</child> </family> <family> <parent>B</parent> <child>B1</child> </family> <family> <parent>B</parent> <child>B2</child> </family> <family> <parent>B</parent> <child>B3</child>...