[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: E [Xerces] Attribute value "1" of type ID must be

Subject: Re: E [Xerces] Attribute value "1" of type ID must be an NCName when namespaces are enabled.
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Aug 2009 12:48:41 -0400
Re:  E [Xerces] Attribute value "1" of type ID must be
At 2009-08-13 11:31 +0200, Manuel Souto Pico wrote:
This might be more an XML-related issue than XSL-related, but it happens in a file that I produced with a XSL stylesheet.

Could you help me interpret this error (in the subject)? What could I do to make the document valid?

Make the attribute value a name instead of a token leading with a digit.


Note that "when namespaces are enabled" is misleading because even without namespaces enabled attributes declared of type ID must have values that are names and the string you have used is not a name (though it is an NMTOKEN).

My (simplified) file is:

<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE martif
PUBLIC "ISO 12200:1999A//DTD MARTIF core (DXFcdV04)//EN" "TBXcdv04.dtd">-->
<!DOCTYPE martif SYSTEM "TBXcoreStructV02.dtd">

You do not show us the DTD, but based on the error message I'm assuming it has a declaration along the lines of:


<!ATTLIST termEntry id ID #IMPLIED>

... which means its values must be valid XML names per file:///Z:/data/docs/w3c/Architecture/xml/REC-xml-20081126.htm#sec-attribute-types that states the validity constraint that values of type ID must match the Name production.

<termEntry id="1">

The string "1" is not a valid name.


I hope this helps.

. . . . . . . . . . Ken

--
Interested in these classes?  http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.