[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Saxon8 beginner questions

Subject: RE: Saxon8 beginner questions
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 20 Jul 2005 17:48:40 +0100
unable to access jar file
Firstly, to get this to run I had to change the encoding in both files -
they may have started life as utf-8, but they were not in UTF-8 by the time
they appeared in my email.

When you use the html output method, Saxon will insert a <meta> element as
part of the HTML <head> element. However, it won't do that if there isn't an
HTML <head> element. That's the case here, because your <head> element is
actually in the XHTML namespace, which the html output method doesn't
recognize. This also explains why the <br> element is being rendered the way
it is. You need to decide whether you are writing HTML or XHTML and then be
consistent.

Your call on current-date omitted the () so it was not recognized as a
function call (instead, Saxon looked for a child element called
current-date, and didn't find one).

The classpath is ignored by Java when you use the -jar option on the command
line. The message "Unable to access JAR file" means that you have mistyped
the path to the JAR file.

Michael Kay
http://www.saxonica.com/


> -----Original Message-----
> From: Manfred Staudinger [mailto:manfred.staudinger@xxxxxxxxx]
> Sent: 19 July 2005 20:59
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Saxon8 beginner questions
>
> Hi,
> I do have same basic problems when using xslt and xpath with
> saxon8. Below are xml, xsl, and cmd for my minimal test-case.
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <?xml-stylesheet type="text/xsl" href="docv2_2.xsl"?>
> <doc>
> Test f|r XSLT 2.0
> </doc>
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <xsl:stylesheet version="2.0"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="html"
>    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
>    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
>    encoding="UTF-8"
>    omit-xml-declaration="yes" />
> <xsl:template match="/">
> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
> <head><title>Test f|r XSLT 2.0</title>
> <link rel="stylesheet" href="Doku.css" type="text/css" />
> </head><body>
>    <h1><xsl:value-of select="." /></h1>
>    <xsl:value-of select="current-date" /><br />
> </body></html>
> </xsl:template>
> </xsl:stylesheet>
>
> java -jar C:\Programme\Saxon\saxon8.jar C:\staudinger\xml\docv2_2.xml
> docv2_2.xsl
>
> Now my problems:
> - it seems the output encoding="UTF-8" is not producing
>   a <meta charset=UTF-8" /> as it should, but I'm unable
>   to figure out why (despite I have seen it a few days ago)!
>   I can see also uuml; instead of | in the output, which
>   might be connected to the above.
> - the function current-date seems to return a null string.
> - empty xhtml tags are transformed into invalid sequences
>   like <br></br>
> - I specified CLASSPATH C:\Programme\Saxon\saxon8.jar
>   (nothing else) as a system environment variable (winnt sp6)
>   to no effect: when I omit the CLASSPATH the cmd above
>   still works, and when I try java -jar saxon8.jar ... I get the msg
>   "Unable to access jarfile saxon8.jar" and Exit code: 1
> - I would like to get a hint how to specify a minimum CLASSPATH
>   for this configuration: JDK 1.5 plus Saxon 8B.
>   I've installed java version "1.5.0_04"
>   Java(TM) 2 Runtime Environment, Standard Edition (build
> 1.5.0_04-b05)
>   Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
>
> I like Saxon very much especially for being able to take a
> look on the output.
> Is there any way to see what Firefox or IE6 produce?
>
> Regards, Manfred Staudinger, Vienna

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.