That was a typo! oops!
I meant xsl:stylesheet and for some reason it doesn't work
although the error is different than the reported one (due to the typo).
ERROR: The element 'xsl:stylesheet' is used but not declared in the
DTD/Schema.
Source: ' version="1.0">'
Line: 4, Pos: 32
I've seen it in the FAQ and everybody assumes that it works like that
but I've never managed to make it work. :-(
Regards,
Yago
-----Original Message-----
From: Jeni Tennison [mailto:jeni@xxxxxxxxxxxxxxxx]
Sent: 24 September 2002 16:51
To: Yago Alvarado
Cc: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
Subject: Re: Entities within my stylesheet.
Hi Yago,
> <!DOCTYPE stylesheet [
> <!ENTITY ntilde "ñ" ><!-- small n, tilde -->
> ]>
>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">
> <xsl:output method="text"/>
>
> <xsl:template match="/">
> ñ
> </xsl:template>
>
> </xsl:stylesheet>
>
>
> I've seen this many times but I've never managed to make it work.
>
> I always get an error like:
>
> ERROR: The name of the top most element must match the name of the DOCTYPE
> declaration.
>
> Source: '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="1.0">'
> Line: 6, Pos: 80
That's because the name that you specify in a DOCTYPE declaration
must exactly match the (qualified) name that you use for the document
element in the XML document. In your case, you have:
<!DOCTYPE stylesheet ...>
and:
<xsl:stylesheet ...>...</xsl:stylesheet>
"stylesheet" and "xsl:stylesheet" aren't the same, so any XML parser
should object. Try using:
<!DOCTYPE xsl:stylesheet [
<!ENTITY ntilde "ñ" ><!-- small n, tilde -->
]>
instead and it should work.
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
_____________________________________________________________________
This e-mail has been scanned for viruses by the WorldCom Internet Managed
Scanning Service - powered by MessageLabs. For further information visit
http://www.worldcom.com
_____________________________________________________________________
This e-mail has been scanned for viruses by the WorldCom Internet Managed Scanning Service - powered by MessageLabs. For further information visit http://www.worldcom.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|
G. Ken Holman - Tue, 24 Sep 2002 11:51:01 -0400 (EDT)
David Carlisle - Tue, 24 Sep 2002 12:01:32 -0400 (EDT)
Yago Alvarado - Tue, 24 Sep 2002 11:58:27 -0400 (EDT) <=
Yago Alvarado - Wed, 25 Sep 2002 06:25:54 -0400 (EDT)
Yago Alvarado - Wed, 25 Sep 2002 09:13:25 -0400 (EDT)
|
|