|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Invoking XSLT 2.0
On 4/28/07, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> I guess I'll be limiting myself if I relate to other > languages because, it is possible to call separate named > templates in the same XSL file from the command line, but > with the main() method one can only call a single method and > not other methods from the command line.
I was able to test the above with 1 stylesheet and 4 templates, and was able to invoke each template from the command line. ------------------------------------------------------------- 1 stylesheet with 4 named templates. ------------------------------------------------------------- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <!-- in this case the XML prolog is omitted --> <xsl:template name="htmlLikeOutput"> <html> <head></head> <body> <p>The rain in spain</p> <p>stays mainly on the plain</p> <hr/> <!-- Unescaped special character &, not allowed unless it is inside a cdata --> Escaped special character & </body> </html> </xsl:template> <xsl:template name="xhtmlLikeOutput"> <html xmlns="http://www.w3.org/1999/xhtml"> <head></head> <body> <p>The rain in spain</p> <p>stays mainly on the plain</p> <hr/> <!-- Unescaped special character , not allowed & --> Escaped special character & <!-- View Source in browser --> </body> </html> </xsl:template> <xsl:template name="xmlLikeOutput"> <somenode> <innernode> <sometext> <!--Unescaped special character & --> Escaped special character & </sometext> </innernode> </somenode> </xsl:template> <xsl:template name="textLikeOutput"> comman, separated, tokens, test, hello, world <!--Unescaped special character & --> Escaped special character & </xsl:template> </xsl:stylesheet> ----------------------------------------------------------------- command line ----------------------------------------------------------------- java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it xmlLikeOutput ouput_method_none.xsl > output1.xml java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it htmlLikeOutput ouput_method_none.xsl > output1.xml java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it xhtmlLikeOutput ouput_method_none.xsl > output1.xml java -jar c:\dev\saxonb8-9-0-3j\saxon8.jar -it textLikeOutput ouput_method_none.xsl > output1.xml
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






