RE: [xsl] Colon in entity reference error

Subject: RE: [xsl] Colon in entity reference error
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Fri, 24 Aug 2001 14:44:01 -0400
Jacqueline,

This looks like a straightforward validation error to me: somewhere in your process, your document is being validated against a schema (probably a DTD from the looks of it), which declares the 'source' attribute on the 'image' element as being one of the types reported in the error message (assuming the error message is correctly locating the error). These types have to match the XML production for a 'name', which restricts the character set. According to this parser, the colon ':' is illegal in a name value (I think that's a pretty strict reading of the XML Rec, myself), so the value 'C:\Program Files\Sample\ToneFig3.tif' is being kicked out as invalid. (The backslash will also not be allowed in an XML name.)

It's not strictly an XSL problem: the document isn't even getting as far as the XSL. The solution is any of: (1) fix your data so there is an acceptable value there, or (2) fix the DTD (for example, change the attribute type to CDATA, which is more permissive), or (3) turn off the DTD-validation in your process (since it's optional from the XSL point of view) and live with the fact that your documents may not be valid. If you adopt the last course, you should be careful that your process isn't expecting any attribute value defaults to be provided by the DTD.

Cheers,
Wendell

You wrote:
I keep getting the following error:

Entity names, PI targets, notation names and attribute values declared to be
of types ID, IDREF(S), ENTITY(IES) or NOTATION cannot contain any colons.
Line 4, Position 1295

with the arrow pointing to this point:

<image source="C:\Program Files\Sample\ToneFig3.tif"/>


======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================


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



Current Thread