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: [relax-ng] compact instance syntax


I keep thinking about a compact syntax for instances to complement the RELAX
NG compact syntax. I think people would like it. I imagine it would use
names instead of keywords, though some keywords from RNC still could apply.
Something like

# instance of foo
default namespace = "http://www.example.com";
foo { att="glorp", bar, baz, boz, biz }
bar { "a string" }
baz { buz }
buz { "another string" }
boz { att="glorp" }
biz { "" }

would be serialized as

<?xml version="1.0" encoding="UTF-8"?>
<!-- instance of foo -->
<foo att="glorp" xmlns="http://www.example.com";>
 <bar>a string</bar>
 <baz><buz>another string</buz></baz>
 <boz att="glorp"/>
 <biz></biz>
</foo>

Some of the RELAX NG compact syntax could be used, except, for example,
there would be no occurrence operators * + ? or types.

Short of this, perhaps an RNC processor option (such as "-s foo.xml") could
serialize an instance based on a schema, with some simple rules (such as
using the first choice in a choice, etc.) I don't think we would have to
require RNC processors to do this, so it could be specified in a separate
specification which I would be happy to draft.

Mike



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


Powered by eList eXpress LLC