[xml] validation fails for embedded RELAX NG schema
- From: Jerzy Jalocha N <jjalocha gmail com>
- To: xml gnome org
- Subject: [xml] validation fails for embedded RELAX NG schema
- Date: Mon, 3 Aug 2009 02:28:14 -0400
Hi everyone, this is my first post here. Thanks for the amazing
xsltproc and xmllint tools!
I would like to use a RELAX NG schema that is embedded inside some
"outer" XML file:
<?xml version='1.0' encoding='UTF-8'?>
<wrapper xmlns='http://namespace.net/something'>
<!-- Here would go a lot of stuff that belongs to the wrapper. -->
<grammar xmlns='http://relaxng.org/ns/structure/1.0'>
<start>
<element name='data'>
<zeroOrMore>
<element name='entry'>
<text/>
</element>
</zeroOrMore>
</element>
</start>
</grammar>
</wrapper>
Sadly, xmllint (2.6.32) complains about an empty schema:
example-schema.xml:0: Relax-NG parser error : xmlRelaxNGParse:
example-schema.xml is empty
Relax-NG schema example-schema.xml failed to compile.
I know, that I could pre-process my "mixed" document, and extract the
schema with XSLT prior to validation. But this would make the whole
project quite a lot more complex, thus I'd like to avoid it, if
possible.
I guess, that I am not doing anything illegal by using two
vocabularies side-by-side, as long as I use separate namespaces, or am
I wrong?
Is this a known limitation of xmllint, or maybe a bug?
Any thoughts about this are appreciated.
Regards,
Jerzy
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]