docbook - preproccesing in XSLT -
Is it possible to 'pre-process' in XSLT?
Prefetching means the source of the tree (in memory presentation).
Is it possible, or I need to make many changes for this.
Use Cases: We have DOCKBOOK reference booklets for customers, but for some customers, they require different 'skins' (different images, etc.) so I hope to do Based on the parameter, the image changes the fileref path then apply the rest of the usual docbook to XSL templates.
Expansion on the Answer to Imaan ...
Issues of XSLT 1.0 or 2.0 In, you will get the intermediate (pre-processed) result & lt; Xsl: variable> elements, either globally (top level) or locally (declared template).
& lt; Xsl: variable name = "intermediate-result" & gt; & Lt ;! - Code to create pre-processed results, eg: - & gt; & Lt; Xsl: applied-template mode = "pre-process" /> & Lt; / XSL: variable & gt; In XSLT 2.0, the value of $ intermediate-result variable is a node sequence in which a document node (called "root node" in "XSLT / XPath 1.0") is included. You can access it and use it like you select any other variable, such as = "$ intermediate-result / doctor" but in XSLT 1.0, $ intermediate-result variable The value is not the first class node-set, instead it is called some "tree slice of the result". It behaves like a node-set that has a root node, but you can restrict it how you can use it. You can copy it and get its string-value, but you can not drill using XPath, such as select = "$ intermediate-result / doc" to do this, you first have to do it with your processor Use the node-set () extension function to convert to first-class node-set. In Saxon 6.5, libxslt, and 4xslt, you can use exsl: node-set () in response (in response to Eamon). In MSXML, you have to use MSXSL: node-set (), where xmlns: msxsl = "kalash: Microsoft-com: xslt", and in excellence, I believe its name is xalan: nodeset () (without hyphen , But you will have Google's namespace URI). For example: Selection = "exsl: node-set ($ intermediate-result) / doc"
XSLT 2.0 terminated the fragment of the tree, making node-set unnecessary.
Comments
Post a Comment