Re: [xml] validation fails for embedded RELAX NG schema

Jerzy Jalocha N schrieb:
On Mon, Aug 3, 2009 at 8:34 AM, Michael Ludwig<mlu as-guides com>
I'd be surprised to discover that embedding RNG schemas in arbitrary
documents is actually supported. What makes you think it is?

I am actually absolutely not sure about this. [...] I just took the
following information, and put it together:

 * It is valid from the XML point of view (as you agree with me).

Strictly speaking, it is well-formed, but not valid - validity requires
validation against a DTD, or another schema. But I know what you mean.

 * And xmllint copes perfectly with the opposite case, of arbitrary
content embedded in the RELAX NG schema:

<?xml version='1.0' encoding='UTF-8'?>
<grammar xmlns=''>
   <embedded xmlns=''>
      <!-- Arbitrary content embedded here. -->
   <start xmlns=''>

Haven't checked, but that is probably permitted by the Relax NG

Adding these two pieces of information, It seems reasonable, or at
least probable, to embed the whole schema in an arbitrary XML

Consider that you could embed C source code in an XML document. Would it
be reasonable to assume that doing so would automagically invoke the

On a sidenote, XSLT has a mechanism to convey an XSLT meaning to a
document other than <xsl:stylesheet> :

So your assumption about Relax NG is not absurd in principle; any such
auto-mechanism just typically has (and probably needs) a more thorough

(I seem to remember, though, that the Perl interpreter has a flag for
allowing execution of Perl code from text such as an email. Go figure.
In eight years, I think I've never used that -x flag.)

Michael Ludwig

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