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: Comments on the formal semantics



----- Original Message -----
From: "Murata Makoto" <mura034@attglobal.net>
To: <relax-ng@lists.oasis-open.org>
Sent: Wednesday, June 06, 2001 11:14 PM
Subject: Comments on the formal semantics


> 1. Two inference rules for <attribute>?
>
> Why do you need two inference rules for <attribute>?

The problem is that with the change atoms being characters to strings, what
previously could be presented by an empty sequence can now also be
represented by an empty string.  As I have set things up at the moment, an
empty is a pair of a name and a string.  Thus an attribute

foo=""

will have a value that is an empty string.  Whereas an element

<foo></foo>

will have a value that is an empty sequence.  Treating these equivalently
requires the extra rule.  Another way to set things up is to say that an
attribute has a value that is a sequence of at most one string (ie it's
either a string or the empty sequence).  That's a little bit strange, but it
would allow a single rule for attribute.  I'll give this a try, and we can
see if it works out better.

> 2. The inference rule for <element>
>
> What is meant by ns2?  In my understanding, if we have an element
>
>      <foo xmlns:bar="..some url">
>
> we have to revise the current prefix-URI mapping.

I am assuming a data model in which every element has a complete namespace
map, which represents the cumulative effect of all the in-scope namespace
declarations. See the [in-scope namespaces] property of the XML Infoset:

http://www.w3.org/TR/xml-infoset/#infoitem.element

(This is how XML Schema, XPath and XSLT do things.)  A pattern is an
instance of an XML element, so it should use the same data model.  It's not
obvious what the right notation for this is; maybe I could be the ns2 in
curly braces:

<value {ns2} type="ln" namespace="u">

and then in the notation section explain that this refers to the [in-scope
namespaces] property.

James









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


Powered by eList eXpress LLC