OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: [relax-ng] Default content for attributes in the compact syntax


Parsing problems arise only if you allow the braces to be omitted.  Eric 
was suggesting only allowing what's inside the braces to be omitted, not 
the braces themselves.  This is possible.  Personally, I think the braces 
with nothing inside look ugly and strange.

As for round-tripping, there's no guarantee that a round-trip will give you 
an XML document with an identical infoset.
For example, the distinction between

  <element name="foo">

and

  <element><name>foo</name>

is not preserved.

The guarantee is rather looser: that the things that are likely to be 
important to a user are preserved.  Given

  attribute foo { text }

trang will generate

  <attribute name="foo"/>

Of course, if the text had annotations, it would generate a <text/> element 
to hold the annotations.

I can imagine that somebody might prefer a style in which <text/> was made 
explicit in the content of attributes (which could be handled by an option 
on trang) but I find it hard to imagine a case where it would be important 
to a user to have some <attribute/> patterns with explicit <text/> content 
and some with implicit <text/> content.

--On 12 June 2002 15:13 -0700 Michael Fitzgerald <mike@wyeast.net> wrote:

> Eric,
>
> I ran into this, too. The compact syntax requires the braces and text
> token because of an ambiguity when using name classes.
>
> See http://lists.oasis-open.org/archives/relax-ng/200205/msg00039.html.
>
> Mike
>
>> -----Original Message-----
>> From: Eric van der Vlist [mailto:vdv@dyomedea.com]
>> Sent: Wednesday, June 12, 2002 6:14 AM
>> To: relax-ng@lists.oasis-open.org
>> Subject: [relax-ng] Default content for attributes in the compact syntax
>>
>>
>> Sorry if this has already been covered, but I have noticed that there is
>> no default child content pattern for attribute in the compact syntax.
>>
>> In other words,
>>
>> <attribute name="foo"/> is legal and transformed during the
>> simplification process into
>> <attribute><name>foo</name><text/></attribute> while in the compact
>> syntax, "attribute foo {}" is invalid.
>>
>> I guess that this is needed to insure syntactical coherence in the
>> compact syntax, but is it normal|wishable to introduce differences
>> between the two syntaxes and doesn't it affect round triping?
>>
>> Thanks
>>
>> Eric
>> --
>> See you in San Diego.
>>                                 http://conferences.oreillynet.com/os2002/
>> ------------------------------------------------------------------------
>> Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
>> http://xsltunit.org      http://4xt.org           http://examplotron.org
>> ------------------------------------------------------------------------
>>
>>
>> ----------------------------------------------------------------
>> To subscribe or unsubscribe from this elist use the subscription
>> manager: <http://lists.oasis-open.org/ob/adm.pl>
>>
>
>
> ----------------------------------------------------------------
> To subscribe or unsubscribe from this elist use the subscription
> manager: <http://lists.oasis-open.org/ob/adm.pl>
>
>




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC