Re: [xml] libxml2 behaves differently on actual <attribute> vs attribute inserted using <ref>

Hi Belgabor,

Thanks for trying this with your validator.

I agree it seems like a bug / inconsistency in libxml2.

I would still be interested to hear comment about this
from other folks.

= jatayu

On Thu, Apr 3, 2008 at 3:27 PM, Belgabor <belgabor gmx de> wrote:
Sounds like a bug. My own validator based on rnv tells your snippet xml is valid and the validator that uses libxml2's engine gives me the same error.

Jatayu schrieb:
Hi all,

I used <ref> to reference a predefined attribute in my Relax NG schema,
but I received this error from libxml2:

    "Invalid attribute Title for element Book"

See below schema and xml snippets (notice the <ref name="TitleAttribute"/>
under "Book" element.

I did not get the same error if I directly specify the <attribute>
under "Book", i.e: without using <ref>.

Anyone know why this is the case or what I'm missing?

Any help/comment is very much appreciated.


=========== test.rng ====================
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns=""

   <element name="Book">
     <ref name="TitleAttribute"/>  <!-- NOTE: I think using ref here
generates error. -->
         <element name="Author">

 <define name="TitleAttribute">
   <attribute name="Title">
     <data type="token"/>


=============== test.xml =========================

<Book Title="History101">
 <Author>Joe Joe</Author>
 <Author>Jill Jill</Author>



xml mailing list, project page
xml gnome org

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