Re: ASN.1 => XML Schema questions

> Really? Which ones?
> 
> Assuming you meant RELAX-NG,
> I just spent an hour or so looking at the RELAX-NG
> stuff, and I don't see any indication that it can.

Deciding element/attribute types is possible for RELAX NG; that is, say
you have annotated your RELAX NG grammar with IDs:

<element name="foo" id="e1">
  <oneOrMore>
    <element name="bar" id="e2">
      <text/>
    </element>
  </oneOrMore>
</element>

Then the validator is essentially capable of producing output like this.

<foo> : e1
  <bar/> : e2
  <bar/> : e2
  <bar/> : e2
</foo>

"<foo> : e1" means that the element declaration e1 validates this <foo>
element. I think this is a part of PSVI.

Of course PSVI includes many other things, like default attribute values.
But those are not our current issue, aren't they.


The only difference, with regard to the type assignment, between RELAX
NG and W3C XML Schema is that W3C XML Schema ensures that you can always
tell the type of elements/attributes when you see its startElement SAX
event, whereas RELAX NG doesn't.

But the way W3C XML Schema ensures this is ad hoc. As a result, many
grammars (including the one written by Geoff) are prohibited even though
they satisfy this property.



regards,
----------------------
K.Kawaguchi
E-Mail: kohsukekawaguchi@yahoo.com

Received on Tuesday, 26 June 2001 20:55:24 UTC