[xml] Re: Entities in attributes



John Fleck wrote:
On Thu, 2002-08-08 at 03:29, Vitaly Ostanin wrote:

Hello, All!

Please, tell me - can I use entities in values of attributes ?

I use DocBook/XML DTD and wrote
<section id="&BASEID;.short-intro">

After validating with xmllint I get error:
"Syntax of value for attribute id on section is not valid"

You should have no problem doing this.
The test file I whipped up validated correctly:

******************

<?xml version="1.0"?>
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd";[
  <!ENTITY BASEID "test">
]>
<section id="&BASEID;.short-intro">
  <title>Test</title>
  <para>Test.</para>
</section>

*******************

Sorry, I forgot to specify:
For validating I use command
xmllint --xinclude --postvalid --noout book.xml
and get error.
I use "--postvalid" instead "--valid" for single pass validating of documents with xincludes.

Validating separate chapter with entities in attributes,
with command
xmllint --valid --noout chapter.xml
is ok.

But I want to validate both xinclude and entities in attributes.

<skipped>

--
Regards, Vyt
mailto:  vyt vzljot ru
JID:     vyt vzljot ru




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]