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

Daniel Veillard schrieb:
On Fri, Apr 04, 2008 at 12:26:50PM -0500, Jatayu wrote:
Hi Daniel.

Done. I've submitted a ticket on bugzilla.

By the way, I would be interested to hear your thought
on the extent/level of the RNG support in libxml2.

(brief comment/thought is fine :)

My current project requires the use of xml and I appreciate the fact that
a tool/library like libxml2 out there. I'm still oscillating between XSD vs
but leaning more toward RNG.

Would you say that RNG support in libxml2 is lacking/lagging compared to its
support? (in light of previous post from Belgabor?)

  Fair question, that deserves a fair answer.

  While RNG support may have a few bugs (and a problem providing a good
diagnostic on validation errors mostly due to the kind of algorithm used)
analyzing them means looking at libxml2 code only. For XSD you usually end
up looking at the spec, not understanding it, and then flip a coin (or
run test on others XSD validators) to try to pick an answer. XSD implementation
in libxml2 is where Kasimier had it when he left the project, I can
occasionnaly fix bugs but you have far less garantee with XSD.

I would suggest to invest in RNG because it has a clear semantic, which will keep you sane over the years and over the various implementations.

I agree fully with David here. I've tried xsd first, then switched to RelaxNG and never looked back. If you need things RelaxNG can't do, support it with Schematron. Unfortunately the Schematron validator in libxml2 doesn't support some advanced validation forms directly (ie xslt functions iirc), but since it (Schematron) is fully xsl-based, you can easily implement your own validator using libxslt.

If you want it even easier, take a look at Kohsuke Kawaguchi's shorthand RelaxNG format:

It transforms via a short xsl to valid RelaxNG and saves you a lot of typing.


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