[thelist] xsl-Expected token 'eof'

Peter Abramowicz pabramow at web.net
Tue Jan 14 13:53:02 CST 2003


--
[ Picked text/plain from multipart/alternative ]
Hi,

I'm trying to learn xml/xsl and run into a problem.
When trying to transform one xml document into another using xsl:stylesheet I get followin error:
'Expected token 'eof' found '@'. message-->@<--id'
I've tried googling but so far no luck, any ideas or suggetions would be appreciated.
Thanks in advance,
PeterA.

Here is my code and relevent document:

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
 <xsl:template match="/">
  <xsl:element name="log">
   <xsl:element name="meta">
    <xsl:attribute name="id">
     <xsl:value-of select="message at id"/>
    </xsl:attribute>
    <xsl:attribute name="orgin">
     <xsl:value-of select="message/from"/>
    </xsl:attribute>
    <xsl:attribute name="recipt">
     <xsl:value-of select="message/to"/>
    </xsl:attribute>
    <xsl:if test="message/attachment at file!=''">
     <xsl:attribute name="attachements">
      <xsl:value-of select="'true'"/>
     </xsl:attribute>
    </xsl:if>
   </xsl:element>
   <xsl:element name="info">
    <xsl:value-of select="message/subject"/>
   </xsl:element>
   <xsl:for-each select="message/para">
    <xsl:element name="info">
     <xsl:value-of select="message/para"/>
    </xsl:element>
   </xsl:for-each>
    <xsl:if test="message/attachment at file!= ''">
     <xsl:value-of select="message/attachment at file"/>
    </xsl:if>
  </xsl:element>
 </xsl:template>
</xsl:stylesheet>

<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="dtd_to_schema.xsl"?>
<!DOCTYPE message SYSTEM "http://whytewolf.ca/msg.dtd">
<message id="application">
<from>Peter Abramowicz</from>
<to>Warren Hooper</to>
<subject>My Application</subject>
<body>
 <para>Here is a copy of my application cover letter</para>
 <para>I have also enclosed my resume for your perusal</para>
</body>
<attachment file="resume.doc" />
</message>
--




More information about the thelist mailing list