Technical References - [xsl]

Enables the WebDNA programmer to compile and apply XSL style sheets to XML data, allowing the programmer to query and render XML data as they see fit.

numero = 285
interpreted = N
texte = [xsl var=...&source=...][/xmlparse] Optional Tag Parameters: var - The variable name you specify to represent the XSL parsed object. source - A URL reference to an external XSL file. If 'source' is provided, the content between the [xsl...] and [/xsl] tags is ignored. If you plan on using the [XSL] or [XSLT] WebDNA contexts, you will need to become familiar with the XPath and XSLT languages: XSLT is a language for transforming XML documents into other XML documents. XPath is a language for defining parts of an XML document. There are several online tutorials that will help. Just use your favorite search engine and search for 'XSL XSLT XPATH Tutorials'. These new contexts enable the WebDNA programmer to compile and apply XSL style sheets to XML data, allowing the programmer to query and render XML data as they see fit. [XSL] You can pre-compile XML style sheet code into a WebDNA variable, and then apply the XSL object to XML data via the XSLT context. Compile XSL Lets compile some XSL source into a WebDNA variable called 'xsl_var1'... We use the following code...
[xsl var=xsl_var1]<xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/"><html><body><h2>My CD Collection</h2><table border="1"><tr bgcolor="#9acd32"><th>Title</th><th>Artist</th></tr><xsl:for-each select="CATALOG/CD"><tr><td><xsl:value-of select="TITLE"/></td><td><xsl:value-of select="ARTIST"/></td></tr></xsl:for-each></table></body></html></xsl:template></xsl:stylesheet>[/xsl]
Internally, the WebDNA engine 'saves' this compiled instance as an internal variable named 'xsl_var1'. This saved instance can then be referenced when using the [xslt] context. [xsl var=...&source=...][/xmlparse]

Optional Tag Parameters:

var - The variable name you specify to represent the XSL parsed object.
source - A URL reference to an external XSL file. If 'source' is provided, the content between the [xsl...] and [/xsl] tags is ignored.

If you plan on using the [xsl] or [xslt] WebDNA contexts, you will need to become familiar with the XPath and XSLT languages:

XSLT is a language for transforming XML documents into other XML documents.

XPath is a language for defining parts of an XML document.

There are several online tutorials that will help. Just use your favorite search engine and search for 'XSL XSLT XPATH Tutorials'.

These new contexts enable the WebDNA programmer to compile and apply XSL style sheets to XML data, allowing the programmer to query and render XML data as they see fit.

[xsl]

You can pre-compile XML style sheet code into a WebDNA variable, and then apply the XSL object to XML data via the XSLT context.

Compile XSL

Lets compile some XSL source into a WebDNA variable called 'xsl_var1'...

We use the following code...

[xsl var=xsl_var1]
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Title</th>
<th>Artist</th>
</tr>
<xsl:for-each select="CATALOG/CD">
<tr>
<td><xsl:value-of select="TITLE"/></td>
<td><xsl:value-of select="ARTIST"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
[/xsl]

Internally, the WebDNA engine 'saves' this compiled instance as an internal variable named 'xsl_var1'. This saved instance can then be referenced when using the [xslt] context.

DOWNLOAD WEBDNA NOW!

Top Articles:

AWS Raw WebDNA LAMP-Plus WebServer

Amazon Web Services (AWS) README for Machine Image ID...

[biotype]

BioType is a behavioral biometrics WebDNA function based on ADGS research and development (from version 8...

WebDNA Modules

A list of the currently available modules...

WebDNA Libraries

A list of available libraries for WebDNA...

Download WebDNA Applications

WebDNA applications...

Tips and Tricks

A list of user-submitted tips ...

Related Readings:

[setheader]

Changes header values in a shopping cart...

Alphabetical WebDNA Reference

A list of all WebDNA instructions...

[shell]

[shell] is a way to use the command line with your webserver...

[encrypt]

[encrypt] and [decrypt] allow you to store sensitive data in your databases without risk of exposing it to prying eyes...

[writefile]

[writefile] functions allows you to perform a wide variety of tasks...

[text]

Text variables are fundamental building blocks of the WebDNA language...