Re: [xml] Entities in attributes



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>

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

Could you send me (off-list) a minimal copy of the offending file to
look at?

Cheers,
John
-- 
John Fleck
jfleck inkstain net (h) jfleck abqjournal com (w)
http://www.inkstain.net http://www.abqjournal.com

"Sometimes, a diner is all about the mac and cheese." 
  - Zippy the Pinhead




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