This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook-apps] Validate fails with customized profiling


I don't know what I do wrong because it doesn't work. The error I get is :

../book.xml:6: element para: validity error : No declaration for attribute
my_param of element para
Document ../book.xml does not validate
*** Error code 3
clearmake: Error: Build script failed for "validate"

Makefile:
------------
libxml2-2.6.7/bin/xmllint --nonet --catalogs --xinclude --postvalid --noout
$(BOOK)
--------------

XML:
----------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE chapter SYSTEM "mydb.dtd">

<chapter>
  <title>My title</title>
  <para my_param="yes">
    bla bla
  </para>
</chapter>
---------------

DTD: (No I can't use version 4.2)
--------------
<!ENTITY % local.para.attrib "my_param CDATA #IMPLIED">
<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
%DocBookDTD;
<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED">
------------------

I tried:
<!ENTITY % local.common.attrib "my_param CDATA #IMPLIED">
too but with the same results.

/jens










-----Original Message-----
From: Mauritz Jeanson [mailto:mj@johanneberg.com]
Sent: den 4 april 2005 19:30
To: 'Jens Barkvall'; docbook-apps@lists.oasis-open.org
Subject: RE: [docbook-apps] Validate fails with customized profiling


> -----Original Message-----
> From: Jens Barkvall
>
> DTD:
> <!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
> "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";>
> <!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED">
> <!ENTITY % entity SYSTEM "arch_entity.ent">
> %entity;


First, if you can, use the latest DTD (version 4.4). Then you don't have to
worry about the xml:base attribute since it's already declared.

You don't show the contents of "arch_entity.ent". What's defined there?

Also note that the PUBLIC identifier for your DocBookDTD entity refers to
the SGML version of DocBook (this could cause problems with catalog
lookups).

Anyway, the following local DTD works (my_param becomes a common attribute
by redefining local.common.attrib):

<!ENTITY % local.common.attrib "my_param CDATA #IMPLIED">
<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";>
%DocBookDTD;

If you want my_param to be valid for <para> only, you can do like this:

<!ENTITY % local.para.attrib "my_param CDATA #IMPLIED">
<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";>
%DocBookDTD;


/MJ



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]