xml - transform only the specified elements, dropping the rest -
I am trying to develop an XSLT stylesheet that will transform an XML with another in mind: / P>
- By default, the stylesheet should not display anything for every element (not even the text).
- If there is a clear template match for an element, then copy that element, the attributes and all its sub-values (and their properties)
the second In words, the identity only clearly converts specified elements.
Well, there is definitely nothing to do for anything:
& lt; Xsl: template match = "/ *" & gt; & Lt; XSL: Copy & gt; & Lt; Xsl: Apply-Select Template = "*" /> & Lt; / XSL: Copy & gt; & Lt; / XSL: Templates & gt; & Lt; Xsl: template match = "*" & gt; & Lt; Xsl: Apply-Select Template = "*" /> & Lt; / XSL: Templates & gt; Then you do want to add matches:
& lt; Xsl: template match = "foo; bar" & gt; & Lt; Xsl: copy-of select = "." / & Gt; & Lt; / XSL: Templates & gt; However, it seems like an lot unusual requirement, generally you use those matches which navigate through known knowledge of XML to the known content. We do.
Comments
Post a Comment