|
|
 |
The Syntax
XPathScript follows the basic ASP syntax of introducing code with the
<% %> delimiters. Here's a brief example of a
fully compatible XPathScript stylesheet:
<html>
<body>
<%= 5+5 %>
</body>
</html>
|
This simply outputs the value 10 in a HTML document. The delimiters used
here are the <%= %> delimiters, which are slightly
different in that they send the results of the expression to the browser
(or to the next processing stage in AxKit).
Of course this example does absolutely nothing with the source XML file
which is completely separate from this stylesheet. Here's another
example:
<html>
<body>
<% $foo = 'World' %>
Hello
<%= $foo %> !!!
</body>
</html>
|
This outputs the text "Hello World !!!". Again, we're
not actually doing anything here with our source document, so all XML
files using this stylesheet will look identical. This seems rather
uninteresting until we discover the library of functions that are
accesible to our XPathScript stylesheets for accessing the source
document contents.
|
 |