RE: [xsl] SAXON: How to run?

Subject: RE: [xsl] SAXON: How to run?
From: "SHEIKH Sajjad" <Sajjad.SHEIKH@xxxxxxxxxxx>
Date: Tue, 18 Nov 2003 15:33:22 +0100
Yes indeed the errors have been changed since I tried to correct the
style sheet.

Please find below xml and xsl. Error message is as described below.

********************* POEM.XML *****************************

<poem>
<author>Rupert Brooke</author>
<date>1912</date>
<title>Song</title>
<stanza>
<line>And suddenly the wind comes soft,</line>
<line>And Spring is here again;</line>
<line>And the hawthorn quickens with buds of green</line>
<line>And my heart with buds of pain.</line>
</stanza>
<stanza>
<line>My heart all Winter lay so numb,</line>
<line>The earth so dead and frore,</line>
<line>That I never thought the Spring would come again</line>
<line>Or my heart wake any more.</line>
</stanza>
<stanza>
<line>But Winter's broken and earth has woken,</line>
<line>And the small birds cry again;</line>
<line>And the hawthorn hedge puts forth its buds,</line>
<line>And my heart puts forth its pain.</line>
</stanza>
</poem>

********************* POEM.XSL *****************************

<xsl:stylesheet
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
   version="1.0">

<xsl:template match="poem">
<html>
<head>
	<title><xsl:value-of select="title"/></title>
</head>
<body>
	<xsl:apply-templates select="title"/>
	<xsl:apply-templates select="author"/>
	<xsl:apply-templates select="stanza"/>
	<xsl:apply-templates select="date"/>
	<xsl:apply-templates select="stanza"/>
</body>
</html>
</xsl:template>

<xsl:template match="title">
<div align="center"><h1><xsl:value-of select="."/></h1></div>
</xsl:template>

<xsl:template match="author">
<div align="center"><h2>By <xsl:value-of select="."/></h2></div>
</xsl:template>

<xsl:template match="stanza">
<p><xsl:apply-templates select="line"/></p>
</xsl:template>

<xsl:template match="line">
<xsl:if test="position() mod 2 = 0">&#160;&#160;</xsl:if>
<xsl:value-of select="."/><br/>
</xsl:template>

<xsl:template match="date">
<p><i><xsl:value-of select="."/></i></p>
</xsl:template>

<xsl:template match="stanza">
<xsl:variable name="file" select="concat('verse', position(), '.xml')>
<saxon:output file="{$file}">
	<xsl:copy select="."/>
</saxon:output>	

</xsl:template>


</xsl:stylesheet>

********************* ERROR MESSAGE *****************************
> It does not allow Attribute FILE
> It is looking for href attribute
> It does not allow select statement as well.


-----Original Message-----
From: Michael Kay [mailto:mhk@xxxxxxxxx] 
Sent: 18 November 2003 15:06
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] SAXON: How to run?


> Yes I am positive about it.
> 
> It does not allow Attribute FILE
> It is looking for href attribute
> It does not allow select statement as well.


That's completely different from the error you said you were getting,
which was a bad param=value error on the command line.

Please show us the actual XML, the actual XSL, and the actual error
messages.

Michael Kay
> 
> 
> 
> -----Original Message-----
> From: Michael Kay [mailto:mhk@xxxxxxxxx]
> Sent: 18 November 2003 13:42
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE: [xsl] SAXON: How to run?
> 
> 
> > 
> > C:\j2sdk1.4.1_05>java -jar c:\saxon\saxon6_5_3\saxon.jar
> > c:\1xml\poem.xml c:\1xml\poem.xsl
> > 
> 
> Are you sure that's what you typed? It looks perfectly OK to me.
> 
> Michael Kay
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> ______________________________________________________________
> This message has been scanned for all viruses by BTnet
> VirusScreen. The service is delivered in partnership with MessageLabs.
> 
> This service does not scan any password protected or
> encrypted attachments.  
> 
> If you are interested in finding out more about the service,
> please visit our website at 
> http://www.btignite.com/internetservices/btnet/products_viruss
creen.htm ==============================================================

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


______________________________________________________________
This message has been scanned for all viruses by BTnet VirusScreen. The
service is delivered in partnership with MessageLabs.

This service does not scan any password protected or encrypted
attachments.  

If you are interested in finding out more about the service, please
visit our website at
http://www.btignite.com/internetservices/btnet/products_virusscreen.htm
==============================================================

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread