[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: Re: [relax-ng] Limitation in the compact syntax
> Not utterly. It's just that embedded RNG after roundtripping will not
> be presented as clearly as it might be, not that it won't *work*.
> Converting back to XML will get you the same semantics as before,
> whatever they might be.
I don't see how this is going to be acceptable behaviour for a user. If
- a user were maintaining the source in the compact syntax
- they were making significant use of your proposed feature
- they wanted to manipulate the source using XML tools (e.g. to rename a
definition)
I don't believe they would find it acceptable if all their embedded
patterns got turned into generic annotations.
So I believe that in practice users would have to make a choice between
making use of your feature and being able to round-trip in a useful way.
>> For example, the
>> compact syntax represents both
>>
>> <element name="foo"><empty/></element>
>>
>> and
>>
>> <element><name>foo</name><empty/></element>
>>
>> by
>>
>> element foo { empty }
>>
>> and all of
>>
>> <choice><ref name="foo"/></choice>
>> <group><ref name="foo"/></choice>
>> <interleave><ref name="foo"/></interleave>
>>
>> by
>>
>> (foo)
>>
>
> Which is precisely why exact XML > compact > XML roundtripping does not
> work even now, though the semantics are in fact preserved by this.
I guess it depends what you mean by "work". I mean "behaves in a way that
is likely to be acceptable to a user". I think in this sense XML
roundtripping does work.
>> In such a case,
>> the ooRNG schema might well conform to the RNG schema. However, it
>> wouldn't semantically be RELAX NG. If I fed it to jing -c it, wouldn't
>> work. It would need to be translated first.
>
> Of course it would; first from the compact syntax to the XML syntax via
> Trang, and then from the XML syntax to pure RNG via XSLT.
Right, which is why this is out of scope. We are designing a syntax for
RELAX NG, not for random XML vocabularies that can be translated into RELAX
NG.
James
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC