
I've noticed some inconsistencies in the way Oxygen validates a chapter element in an xinclude file when you add xml:id= I have . I'm trying to add xml:id to chapters so I can change the output html with the use.id.as.filename parameter. I'm using xincludes with each separate xinclude file containing a chapter. I'm getting a weird error message when validating in Oxygen. SystemID: I:\My Documents\xml\rj3\er1.xml Engine name: oNVDL Severity: error Description: bad value for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" Start location: 2:80 ******************************* here is what I have in the er1.xml file: <?xml version="1.0" encoding="UTF-8"?> <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="99er1"> <title xml:id="firstdd">Notion #1</title> <para xml:id="blah">ddddd</para> <para>Designed by Gustave Eiffel in 1889,<parameter ></parameter> The Eiffel Tower is one of the most widely recognized buildings in the world. </para> </chapter> Ok, now for the freaky part. If I remove xml:id attribute, rename the chapter element to sect1 and insert xml:id again, it validates just fine. I've tried it several times and can duplicate it each time on my machine. I've tried the Reset Cache and Validate option each time. Any idea if this is an Oxygen/validator bug or if there is something peculiar to xinclude syntax which I am overlooking? Any reason why this corrects the problem? By the way, sometimes it can be difficult to tell whether a problem is an application-specific problem or a docbook/xsl problem. Thanks. Robert -- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 htpt://www.robertnagle.info

Robert Nagle wrote:
SystemID: I:\My Documents\xml\rj3\er1.xml Engine name: oNVDL Severity: error Description: bad value for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" Start location: 2:80
******************************* here is what I have in the er1.xml file:
<?xml version="1.0" encoding="UTF-8"?> <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="99er1">
IDs must start with letter (or underscore and few other characters) but not with number. This is cause of your error. -- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------

Jirka, This is amazingly useful and nonobvious information. I never would have thought of this mistake. Thank you. I looked at the spec for xml:id and I cannot seem to find a reference to this requirement. Perhaps I am not understanding a concept or terminology used on the spec page. http://www.w3.org/TR/xml-id/ For future reference, how would I know about a requirement on an attribute value like this one? Robert Ngle 2009/6/28 Jirka Kosek <jirka@kosek.cz>:
Robert Nagle wrote:
SystemID: I:\My Documents\xml\rj3\er1.xml Engine name: oNVDL Severity: error Description: bad value for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" Start location: 2:80
******************************* here is what I have in the er1.xml file:
<?xml version="1.0" encoding="UTF-8"?> <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="99er1">
IDs must start with letter (or underscore and few other characters) but not with number. This is cause of your error.
-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------
-- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 htpt://www.robertnagle.info

Section 4 of the xml:id specification says the normalized value of the attribute is an NCName and contains links to the NCName definitions for XML 1.0 and XML 1.1. The XML 1.0 definition is easier to understand, but the XML 1.1 definition is more complete. They're not equivalent; you should use IDs that conform to the specification for whichever version of XML you're using. The restrictions on ID names are fundamental to XML. Any decent introduction to XML should cover them, along with other stuff one simply has to know. -----Original Message----- From: oxygen-user-bounces@oxygenxml.com [mailto:oxygen-user-bounces@oxygenxml.com] On Behalf Of Robert Nagle Sent: Monday, June 29, 2009 1:26 PM To: Jirka Kosek Cc: oxygen-user@oxygenxml.com Subject: Re: [oXygen-user] xml:id + docbook5 validation problems Jirka, This is amazingly useful and nonobvious information. I never would have thought of this mistake. Thank you. I looked at the spec for xml:id and I cannot seem to find a reference to this requirement. Perhaps I am not understanding a concept or terminology used on the spec page. http://www.w3.org/TR/xml-id/ For future reference, how would I know about a requirement on an attribute value like this one? Robert Ngle 2009/6/28 Jirka Kosek <jirka@kosek.cz>:
Robert Nagle wrote:
SystemID: I:\My Documents\xml\rj3\er1.xml Engine name: oNVDL Severity: error Description: bad value for attribute "id" from namespace "http://www.w3.org/XML/1998/namespace" Start location: 2:80
******************************* here is what I have in the er1.xml file:
<?xml version="1.0" encoding="UTF-8"?> <chapter xmlns="http://docbook.org/ns/docbook" version="5.0" xml:id="99er1">
IDs must start with letter (or underscore and few other characters) but not with number. This is cause of your error.
-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://xmlguru.cz ------------------------------------------------------------------ Professional XML consulting and training services DocBook customization, custom XSLT/XSL-FO document processing ------------------------------------------------------------------ OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member ------------------------------------------------------------------
-- Robert Nagle 12777 Ashford Point Dr #1417 Houston, Texas 77082 713 893 3424 htpt://www.robertnagle.info _______________________________________________ oXygen-user mailing list oXygen-user@oxygenxml.com http://www.oxygenxml.com/mailman/listinfo/oxygen-user
participants (3)
-
Jesse Pelton
-
Jirka Kosek
-
Robert Nagle