RE: [xsl] Entity Problems...

Subject: RE: [xsl] Entity Problems...
From: "Angela Williams" <Angela.Williams@xxxxxxxxxxxxxxxxxx>
Date: Fri, 17 Aug 2007 11:27:36 -0500
Gotta love tiny mce!  We fight with it daily....

We did exactly what David suggested - add the DOCTYPE declaration to the
top of the xml file - it won't prevent validation against a schema.

I think there is a setting on the DOM that can be updated also - we were
eventually able to remove this from the xml.  It may be that our JSF guy
manually stripped these out, I'm not sure.


Thanks!
Angela

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Friday, August 17, 2007 11:17 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Entity Problems...


entities need to be defined in a DTD, otherwise an XML parser will flag
an error on undefined entities, so if a file has &nbsp; it needs to
start with something line

<!DOCTYPE something [
<!ENTITY nbsp "&#160;">
]>
<something> ....

this is an XML requirement, not an XSLT one.

Alternatively the DTD can be defaulted, but how to do that depends on
the system but a catalog file could specify that any document with
document element <something> should be parsed using a specified DTD that
defined this entity.

Or of course you could perhaps use a non-xml parser. For exampe saxon
can use any sax parser and is often used with the tagsoup html parser
which reports sax events to xslt as if an xml file was being parsed but
parses pretty much anytrhing that looks a bit like html, including any
use of any html entity names.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

Current Thread