Re: [xsl] Empty object

Subject: Re: [xsl] Empty object
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 28 Jan 2004 13:51:56 GMT
> I am using a xsd in my stylesheet.

An XSLT1 system won't make any use of an XSD schema.
(Or do you mean the schema reference is in the source file rather than
in the stylesheet?)

> I have only developed stylesheets that 
> either have a DTD or xsd; but not both combined.

You can reference both, an XSLT1 system will ignore the schemaLocation
reference whether or not a dtd is used, but the xml parser reading the
stylesheet will parse a <!DOCTYPE dtd declaration and process any entity
declarations in the internal subset, and in most cases also entities
declared in the external subset of the dtd.

If you use an entity such as nbsp then you have to have a DTD as
otherwise the file is not well formed XML and can not be used by any XML
aplication, xslt in particular.

>From your previous message it appears that your system was transforming
the undefined entity reference &nbsp; into the text "nbsp" if it was
doing that, rather than giving a fatal error and not producing any
output at all, then it was not conforming to the XML specification.

However if what you want is to generate a nbsp in the output you don't
need a schema or dtd in the stylesheet: just use the character reference
&#160;

David


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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


Current Thread