[xml] Re: namespace xmllint error (libxml 2.5.11)



Morus Walter <morus walter tanto-xipolis de> writes:

Hi,

Doing the same thing with libxml2 version 2.4.7 (linux) works fine.

That's surprising. Are you sure?

Absolutely. Tested more then once with two different documents.

DTD validation does not work with documents using namespaces.
Use relaxNG (or the subset of XML schema libxml supports) or
add the prefixes (and namespace attributes) to your dtd
(which is a hack, since namespace prefixes should be meaningless outside
the xml instance).

OK, I think I'll add the namespace to the dtd first, but also look at
relaxNG. 

BTW: as far as I can see (it's my first day of relaxNG) there are two
ways to describe relaxNG: xml-syntax and short syntax. Are they both
supported by libxml or is one prefered over the other?


James Clarks trang is a dtd to relaxNG converter, so you would just have to
add the namespace to the relaxNG schema.

OK, I've found this and I'll give it a try when I don't succeed with
manual translation of the dtd (I feel the urge to learn this stuff)

Thanks for your answer and also to Daniel!

Patrick
-- 
You are your own rainbow!



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