Subject: Re: [newbie] in xslt-file From: Mike Brown <mike@xxxxxxxx> Date: Wed, 1 Nov 2000 18:20:01 -0400 (EST) |
Vincent De Baere wrote: > [cut-'n-no-paste] > <xsl:template match="article/b2/tekst"> > <tr><td> </td> > <td><xsl:value-of select="./@author"/></td> > <td> </td></tr> > </xsl:template> > [cut-'n-no-paste] > > However, this does not work. The parser (msxml3.dll) gives an error ("the > stylesheet does not contain a document element. There should at least be an xsl:stylesheet element enclosing the template, where you declare the binding of the xsl prefix to the appropriate namespace for XSLT 1.0, and include the appropriate version attribute. There should also be a prolog where you declare that the document is in the XML 1.0 syntax, in a particular encoding. > I tought the entity was predefined in xml. It is not predefined. Only < > & " ' are predefined. You can either use   or  , or you can define an entity like nbsp for the same. Try: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> ]> <xsl:stylesheet xmlns="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="article/b2/tekst"> <tr> <td> </td> <td> <xsl:value-of select="./@author"/> </td> <td> </td> </tr> </xsl:template> </xsl:stylesheet> See also the FAQs at http://www.netcrucible.com/xslt/msxml-faq.htm and.. er.. it seems the other XSL FAQ has disappeared. - Mike ____________________________________________________________________ Mike J. Brown, software engineer at My XML/XSL resources: webb.net in Denver, Colorado, USA http://www.skew.org/xml/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [newbie] in xslt-file, T.Pospisek's MailLis | Thread | Re: [newbie] in xslt-file, Jeni Tennison |
Re: XML Certification, Brand_Niemann | Date | XSL FAQ location?, Mike Brown |
Month |