Transform a XML (File|org.w3c.dom.Node|String) using a XSL of transformation (File|org.w3c.dom.Node|String) and
returns a temporal file with the converted file.
1 dom.transform
<dom.transform encoding='encoding'>
<xml /> !
<xsl /> !
</dom.transform>
Attributes | |||||
---|---|---|---|---|---|
Name | Type | Required | Default | Description | |
Aencoding | string | Indicate the coding of the string of characters to process, as for example ISO-8859-1 or UTF-8. If not specified, it is used the one defined in the configuration file for the server. |
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Exml | Stream | ||||
Exsl | Stream |
Returns | |
---|---|
Type | Description |
File | Temporal file which contains the converted text. |
Example
Convertion of a XML document using a XSL to generare a HTML file.
Copy
<xsql-script name='dom_transform'> <body> <set name='resul'> <dom.transform> <file name='data.xml' type='absolute' /> <file name='data.xsl' type='absolute' /> </dom.transform> </set> <!-- Returns: <html xmlns:xalan="http://xml.apache.org/xalan" xmlns:lxslt="http://xml.apache.org/xslt"> <head> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Sample transform</title> </head> <body> <table style="border: 1px solid green;"> <tr> <td>hello</td> <td>world</td> </tr> </table> </body> </html> --> <-- PRINT BY SCREEN --> <string><file.bytes.read><resul /></file.bytes.read></string> <!-- STORE IN FILE --> <file.bytes.write append='true'> <file name='c:/jas/transformat.txt' type='absolute' /> <string><file.bytes.read><m_resul /></file.bytes.read></string> </file.bytes.write> </body> </xsql-script>