xslt - XSL doesn't transform an array given as parameter -
There is a template "print retractable" file to change the array given in the parameters of my converter object in my XSL
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Xsl: stylesheet xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns: xsl = "http://www.w3.org/1999/XSL/Transform" Excluded-Results -prefixes = "This xls" version = "1.0" & gt; & Lt; Xsl: output indent = "yes" /> & Lt; Xsl: Ultimate Name = "Destination Recovery" /> & Lt; Xsl: Template Name = "Print Documentation" & gt; & Lt; Xsl: Ultimate Name = "Array" /> & Lt; Xsl: if test = "$ array" & gt; & Lt; Xsl: each selection = "$ array / item" & gt; & Lt; Ban & gt; & Lt; Xsl: Select value = "@ value" /> & Lt; / Ban & gt; & Lt; / XSL: for-each & gt; & Lt; / XSL: If & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "af: ascframe" & gt; & Lt; Ascstatistic & gt; & Lt; Destination & gt; & Lt; Ban & gt; & Lt; Xsl: call-template name = "print-documentation" & gt; & Lt; With xsl: select param name = "array" = "$ Destination Recovery" /> & Lt; / XSL: Call-templates & gt; & Lt; / Ban & gt; & Lt; / Destination & gt; & Lt; / Ascstatistic & gt; & Lt; / XSL: Templates & gt; & Lt; / XSL: stylesheet & gt;
I am giving my converter a nodelist object (org.w3c.dom) to two items.
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance (); DocumentBuilder Debuilder = docFactory.newDocumentBuilder (); Document doctor = docbuilder.newDocument (); Element root element = doc.createElement ("root"); Doc.appendChild (rootElement); Element child = doctor .cent element ("item"); Child.setAttribute ("value", "id1"); RootElement.appendChild (child); Element Child 2 = Doc. Socket element ("item2"); Child2.setAttribute ("value", "id2"); RootElement.appendChild (child2); Nodelist Kid RestraintsIDS = Root Element. GetbillNode ();
But after the change, only the first item is inserted into my output object.
I think instead
P>
element child2 = doc .createElement ("item2");
You want
element child2 = doc.createElement ("item");
or you & lt; Xsl: each-select = "$ array / *" & gt;
Comments
Post a Comment