From jjc@jclark.com Wed Sep 24 12:40:44 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O5efXr001460
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 12:40:43 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8O5eZY14055
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 12:40:35 +0700
Message-ID: <3F712DC5.5060607@jclark.com>
Date: Wed, 24 Sep 2003 12:38:13 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [relaxng-user] Testing relaxng-user
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 05:40:47 -0000

This is a test.

James


From ari@cogsci.ed.ac.uk Wed Sep 24 13:48:32 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O6mVjv010515
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 13:48:32 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8O6mfmr006265
	for <relaxng-user@relaxng.org>; Tue, 23 Sep 2003 23:48:41 -0700 (PDT)
	(envelope-from ari@cogsci.ed.ac.uk)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8O6mfbj006262;
	Tue, 23 Sep 2003 23:48:41 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@cogsci.ed.ac.uk using -f
Sender: ari@lib.aero
To: relaxng-user@relaxng.org
From: ari@lib.aero (K. Ari Krupnikov)
Message-ID: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
Lines: 39
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Subject: [relaxng-user] A question on content models
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 06:48:33 -0000
X-Original-Date: 23 Sep 2003 23:48:41 -0700
X-List-Received-Date: Wed, 24 Sep 2003 06:48:33 -0000

::Migrated from xml-dev::

I have a master RNG file that describes general properties of my
grammar, and individual RNG files that describe individual
elements. The master file <include>s the individual ones.

The master file has declarations like

  <define name="class.filter">
    <notAllowed/>
  </define>

Individual files usually say something like

  <define combine="choice" name="class.reader">
    <element name="switch">
      <!-- CM -->
    </element>
  </define>

I use this as a kind of type system. Individual content models may
contain

  <zeroOrMore>
    <ref name="class.filter"/>
  </zeroOrMore>


Question 1: is this a good way of
doing things in RELAX NG, or should I consider a better alternative?

Question 2: I need to add declarations that would be common to all
members of a particular class. An obvious way is to have every element
<ref> the common declarations (a group of attributes in this
case). Can I do it in one place? DTDs don't provide such a mechanism,
XSD does (thought inheritance).


Ari.

From jjc@jclark.com Wed Sep 24 14:03:43 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O73eOx012919
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:03:42 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8O73XY14549
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:03:33 +0700
Message-ID: <3F714136.2000101@jclark.com>
Date: Wed, 24 Sep 2003 14:01:10 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
In-Reply-To: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 07:03:43 -0000

K. Ari Krupnikov wrote:

 > I have a master RNG file that describes general properties of my
 > grammar, and individual RNG files that describe individual
 > elements. The master file <include>s the individual ones.
 >
 > The master file has declarations like
 >
 >   <define name="class.filter">
 >     <notAllowed/>
 >   </define>
 >
 > Individual files usually say something like
 >
 >   <define combine="choice" name="class.reader">
 >     <element name="switch">
 >       <!-- CM -->
 >     </element>
 >   </define>
 >
 > I use this as a kind of type system. Individual content models may
 > contain
 >
 >   <zeroOrMore>
 >     <ref name="class.filter"/>
 >   </zeroOrMore>
 >
 >
 > Question 1: is this a good way of
 > doing things in RELAX NG, or should I consider a better alternative?

It seems good to me.  The only disadvantage is that it may make your 
schemas harder to understand.  You have to weigh that against the better 
modularity it gives you.

 > Question 2: I need to add declarations that would be common to all
 > members of a particular class. An obvious way is to have every element
 > <ref> the common declarations (a group of attributes in this
 > case). Can I do it in one place? DTDs don't provide such a mechanism,
 > XSD does (thought inheritance).

Even with inheritance in XSD, you have do do something on every element 
(namely declare it to have an appropriate type).  You can do this in 
RELAX NG by

- having a definition for each type

- having each type reference the definition of its base type

- having the pattern for each element of that type reference the 
definition for its type (the ref to this definition is serving the same 
role as the type attribute in XSD)

James



From jjc@jclark.com Wed Sep 24 14:20:39 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O7Kaad015132
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:20:37 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8O7KTY14622
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:20:29 +0700
Message-ID: <3F71452E.70800@jclark.com>
Date: Wed, 24 Sep 2003 14:18:06 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
In-Reply-To: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 07:20:39 -0000


> I have a master RNG file that describes general properties of my
> grammar, and individual RNG files that describe individual
> elements. The master file <include>s the individual ones.

It's also worth mentioning that you can use a similar technique with 
attributes.

> The master file has declarations like
> 
>   <define name="class.filter">
>     <notAllowed/>
>   </define>

For sets of attributes, use <empty/> instead of <notAllowed/>

<define name="i18n.attributes">
   <empty/>
</define>

> Individual files usually say something like
> 
>   <define combine="choice" name="class.reader">
>     <element name="switch">
>       <!-- CM -->
>     </element>
>   </define>

Then use combine="interleave" instead of combine="choice".

<define combine="interleave" name="i18n.attributes">
   <attribute name="xml:lang">
     <data type="language"/>
   </attribute>
</define>

James



From ari@lib.aero Wed Sep 24 14:33:19 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O7XI3K016881
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:33:18 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8O7XSmr006430
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 00:33:28 -0700 (PDT)
	(envelope-from ari@lib.aero)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8O7XRkM006427;
	Wed, 24 Sep 2003 00:33:27 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@lib.aero using -f
Sender: ari@lib.aero
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero>
	<3F714136.2000101@jclark.com>
From: ari@lib.aero (K. Ari Krupnikov)
In-Reply-To: <3F714136.2000101@jclark.com>
Message-ID: <86fzimsks8.fsf@fbsd-machine.lib.aero>
Lines: 38
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 07:33:19 -0000
X-Original-Date: 24 Sep 2003 00:33:27 -0700
X-List-Received-Date: Wed, 24 Sep 2003 07:33:19 -0000

James Clark <jjc@jclark.com> writes:

>  > Question 1: is this a good way of
>  > doing things in RELAX NG, or should I consider a better alternative?
> 
> It seems good to me.  The only disadvantage is that it may make your
> schemas harder to understand.  You have to weigh that against the
> better modularity it gives you.

What other (easier to understand, less modular) alternative are you
referring to?

As far as ease of understanding goes, I tangle the individual RNGs
from ``semi-literate'' markup, where the individual elements are
documented. It seemed easier to create one RNG per literate document
than put them all in one RNG.

>  > Question 2: I need to add declarations that would be common to all
>  > members of a particular class. An obvious way is to have every element
>  > <ref> the common declarations (a group of attributes in this
>  > case). Can I do it in one place? DTDs don't provide such a mechanism,
>  > XSD does (thought inheritance).
> 
> Even with inheritance in XSD, you have do do something on every
> element (namely declare it to have an appropriate type).  You can do
> this in RELAX NG by
> 
> - having a definition for each type
> 
> - having each type reference the definition of its base type
> 
> - having the pattern for each element of that type reference the
> definition for its type (the ref to this definition is serving the
> same role as the type attribute in XSD)

How would you then say "any element of this type allowed here"?

Ari.

From ari@lib.aero Wed Sep 24 14:46:53 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O7kreV018629
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:46:53 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8O7l2mr006466
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 00:47:02 -0700 (PDT)
	(envelope-from ari@lib.aero)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8O7l25a006463;
	Wed, 24 Sep 2003 00:47:02 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@lib.aero using -f
Sender: ari@lib.aero
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero> <3F71452E.70800@jclark.com>
From: ari@lib.aero (K. Ari Krupnikov)
In-Reply-To: <3F71452E.70800@jclark.com>
Message-ID: <86brtask5l.fsf@fbsd-machine.lib.aero>
Lines: 52
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 07:46:54 -0000
X-Original-Date: 24 Sep 2003 00:47:02 -0700
X-List-Received-Date: Wed, 24 Sep 2003 07:46:54 -0000

James,

Thanks for setting up this list, and for answering so promptly.

James Clark <jjc@jclark.com> writes:

> > The master file has declarations like
> >   <define name="class.filter">
> >     <notAllowed/>
> >   </define>
> 
> For sets of attributes, use <empty/> instead of <notAllowed/>
> 
> <define name="i18n.attributes">
>    <empty/>
> </define>

This may become a FAQ. What's the difference between empty and
notAllowed in this context? Are they ever interchangeable? Would it
mean the same if I said this?

  <define name="class.filter">
    <empty/>
  </define>

> > Individual files usually say something like
> >   <define combine="choice" name="class.reader">
> >     <element name="switch">
> >       <!-- CM -->
> >     </element>
> >   </define>
> 
> Then use combine="interleave" instead of combine="choice".

For attributes or in general? Again, this may be a FAQ, what's the
difference between "choice" and "interleave" in this context? Is

<define name="a" combine="interleave">
  <!-- -->
</define>

the same as

<oneOrMore>
  <define name="a" combine="choice">
    <!--  -->
  </define>
</oneOrMore>
  


Ari.

From EB2M-MRT@asahi-net.or.jp Wed Sep 24 15:13:20 2003
Received: from goro.asahi-net.or.jp (goro.asahi-net.or.jp [202.224.39.40])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O8DIuh022009
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 15:13:19 +0700 (ICT)
Received: from j.asahi-net.or.jp (karl.asahi-net.or.jp [202.224.33.31])
	by goro.asahi-net.or.jp (8.11.7/3.7W) with SMTP id h8O8DCM88716
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 17:13:12 +0900 (JST)
Received: by j.asahi-net.or.jp (ATSON-1) ; 24 Sep 2003 17:13:12 +0900
From: EB2M-MRT@asahi-net.or.jp (Murata Makoto)
To: relaxng-user@relaxng.org
Mime-Version: 1.0
Lines: 38
Message-Id: <3F715217.112946.001@karl.j.asahi-net.or.jp>
Content-Type: text/plain; charset="ISO-2022-JP"
Subject: [relaxng-user] Re: [relax-ng-comment] common-atts
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 08:13:20 -0000
X-Original-Date: 24 Sep 2003 17:13:11 +0900
X-List-Received-Date: Wed, 24 Sep 2003 08:13:20 -0000


> This may become a FAQ. What's the difference between empty and
> notAllowed in this context? Are they ever interchangeable? Would it
> mean the same if I said this?
>   <define name="class.filter">
>     <empty/>
>   </define>

No, <empty/> and <notAllowed/> are not interchangeable.

If you write <element name="foo"><empty/></element>, you allow
<foo></foo>.  If your write <element name="foo"><notAllowed/></element>,
you allow nothing.

In the case of your example, use of <empty/> for class.filter 
means that <element name="foo"><ref name="class.filter"/></element>
allows <foo></foo>.

Some analogy might help to understand <notAllowed/> and <empty/>.
The former is similar to 0 and the latter is similar to 1.
<choice> is simliar to "+".  E.g., 

0 + x = x    <choice><notAllowed/> p1 </choice> = p1

<group> is similar to "*". E.g.., 

0 * x = 0    <group><notAllowed/> p1 </group> = <notAllowed/>

1 * x = x    <group><empty/> p1</group> = p1

Just like 1+x cannot be simplified, <choice><empty/> p1 </choice> 
cannot be simplified.

Hope this helps.

Cheers,

Makoto

From ari@lib.aero Wed Sep 24 15:29:59 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O8Twbk023842
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 15:29:59 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8O8U8mr006690
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 01:30:08 -0700 (PDT)
	(envelope-from ari@lib.aero)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8O8U8ED006687;
	Wed, 24 Sep 2003 01:30:08 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@lib.aero using -f
Sender: ari@lib.aero
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] Re: [relax-ng-comment] common-atts
References: <3F715217.112946.001@karl.j.asahi-net.or.jp>
From: ari@lib.aero (K. Ari Krupnikov)
In-Reply-To: <3F715217.112946.001@karl.j.asahi-net.or.jp>
Message-ID: <867k3ysi5r.fsf@fbsd-machine.lib.aero>
Lines: 12
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 08:30:00 -0000
X-Original-Date: 24 Sep 2003 01:30:08 -0700
X-List-Received-Date: Wed, 24 Sep 2003 08:30:00 -0000

EB2M-MRT@asahi-net.or.jp (Murata Makoto) writes:

> If you write <element name="foo"><empty/></element>, you allow
> <foo></foo>.  If your write <element name="foo"><notAllowed/></element>,
> you allow nothing.

Thank you. I understand it now. What I wanted was an abstract declaration
for a type that elements may declare themselves to belong to, so
<notAllowed/> works. Is this the intended use of notAllowed?

Ari.


From jjc@jclark.com Wed Sep 24 15:45:04 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O8j1pE025658
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 15:45:03 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8O8isY15037
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 15:44:54 +0700
Message-ID: <3F7158F7.8060208@jclark.com>
Date: Wed, 24 Sep 2003 15:42:31 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero> <3F71452E.70800@jclark.com>
	<86brtask5l.fsf@fbsd-machine.lib.aero>
In-Reply-To: <86brtask5l.fsf@fbsd-machine.lib.aero>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 08:45:04 -0000

Murata-san has mostly covered this already but since I had my reply 
mostly written already I'll send it as well.

> What's the difference between empty and
> notAllowed in this context?

The following analogy may help (or it may just confuse things!): if you 
think of choice as addition and interleave as multiplication, then 
notAllowed is like 0 and empty is like 1.

Whether to use notAllowed or empty in this context depends on whether 
you are going to use combine="choice" or combine="interleave". If 
combine="choice" then use notAllowed; if combine="interleave" then use 
empty.  That's because X | notAllowed is equivalent to X for any pattern 
X; similarly, X & empty is equivalent to X for any pattern X.

>>>Individual files usually say something like
>>>  <define combine="choice" name="class.reader">
>>>    <element name="switch">
>>>      <!-- CM -->
>>>    </element>
>>>  </define>
>>
>>Then use combine="interleave" instead of combine="choice".
> 
> 
> For attributes or in general? Again, this may be a FAQ, what's the
> difference between "choice" and "interleave" in this context? Is
> 
> <define name="a" combine="interleave">
>   <!-- -->
> </define>
> 
> the same as
> 
> <oneOrMore>
>   <define name="a" combine="choice">
>     <!--  -->
>   </define>
> </oneOrMore>

No. The combine attribute just says what happens when you have two 
definitions with the same name.  My fingers are getting tired, so I'm 
going to use the compact syntax here:

a &= X
a &= Y

is the same as

a = X & Y

Also

a = attribute foo { ... } & attribute bar { ... }

is equivalent to

a = attribute foo { ... }, attribute bar { ... }

(because attribute order is not significant).  So if you are defining 
sets of attributes you want to use empty and &=.  You would use 
notAllowed and |= for attributes only if you had a case where you wanted 
the schema allowed one of a class of attributes (which is rare).

James








From ari@lib.aero Wed Sep 24 16:25:59 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8O9Pw2M031402
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 16:25:58 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8O9Q8mr006976
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 02:26:08 -0700 (PDT)
	(envelope-from ari@lib.aero)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8O9Q7jC006973;
	Wed, 24 Sep 2003 02:26:07 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@lib.aero using -f
Sender: ari@lib.aero
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] A question on content models
References: <86k77ysmuu.fsf@fbsd-machine.lib.aero> <3F71452E.70800@jclark.com>
	<86brtask5l.fsf@fbsd-machine.lib.aero>
	<3F7158F7.8060208@jclark.com>
From: ari@lib.aero (K. Ari Krupnikov)
In-Reply-To: <3F7158F7.8060208@jclark.com>
Message-ID: <863cemsfkg.fsf@fbsd-machine.lib.aero>
Lines: 22
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 09:25:59 -0000
X-Original-Date: 24 Sep 2003 02:26:07 -0700
X-List-Received-Date: Wed, 24 Sep 2003 09:25:59 -0000

James Clark <jjc@jclark.com> writes:

> Murata-san has mostly covered this already but since I had my reply
> mostly written already I'll send it as well.
> 
> > What's the difference between empty and
> > notAllowed in this context?
> 
> The following analogy may help (or it may just confuse things!): if
> you think of choice as addition and interleave as multiplication, then
> notAllowed is like 0 and empty is like 1.
> 
> Whether to use notAllowed or empty in this context depends on whether
> you are going to use combine="choice" or combine="interleave". If
> combine="choice" then use notAllowed; if combine="interleave" then use
> empty.  That's because X | notAllowed is equivalent to X for any
> pattern X; similarly, X & empty is equivalent to X for any pattern X.

OK, it all makes sense now. Conjunction for universal qualifiers,
disjunction for existential?

Ari.

From chengchangwu@yahoo.com Wed Sep 24 23:42:27 2003
Received: from smtp012.mail.yahoo.com (smtp012.mail.yahoo.com [216.136.173.32])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8OGgRT1097366
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 23:42:27 +0700 (ICT)
Received: from h42-210-66-25.seed.net.tw (HELO magic)
	(chengchangwu@210.66.25.42 with login)
	by smtp.mail.vip.sc5.yahoo.com with SMTP; 24 Sep 2003 16:42:21 -0000
Message-ID: <000a01c382ba$b0381820$2a1942d2@mapa.com.tw>
From: "Cheng-Chang Wu" <chengchangwu@yahoo.com>
To: <relaxng-user@relaxng.org>
Date: Thu, 25 Sep 2003 00:39:33 +0800
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0007_01C382FD.7D357CE0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Subject: [relaxng-user] prep.xsl
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 16:42:28 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C382FD.7D357CE0
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

I'm using xsltproc to split spectest.xml in the test suite. Xsltproc =
complains it cannot load prep.xsl. Where can I find this file?

Cheng-Chang Wu
------=_NextPart_000_0007_01C382FD.7D357CE0
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 6.00.2800.1106" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DMingLiu size=3D2>I'm using xsltproc to split =
spectest.xml in the=20
test suite. Xsltproc complains it cannot load prep.xsl. Where can I find =
this=20
file?</FONT></DIV>
<DIV><FONT face=3D=B2=D3=A9=FA=C5=E9 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3D=B2=D3=A9=FA=C5=E9 size=3D2>Cheng-Chang =
Wu</FONT></DIV></BODY></HTML>

------=_NextPart_000_0007_01C382FD.7D357CE0--


From dpawson@nildram.co.uk Thu Sep 25 00:05:32 2003
Received: from smithers.nildram.co.uk (smithers.nildram.co.uk [195.112.4.34])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OH5VvD001428
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 00:05:32 +0700 (ICT)
Received: from main.nildram.co.uk (dpawson.gotadsl.co.uk [81.6.251.105])
	by smithers.nildram.co.uk (Postfix) with ESMTP
	id 1657225072E; Wed, 24 Sep 2003 18:01:44 +0100 (BST)
Message-Id: <5.2.0.9.2.20030924180200.00b1c928@pop3.Nildram.co.uk>
X-Sender: dpawson@pop3.Nildram.co.uk
X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9
Date: Wed, 24 Sep 2003 18:02:38 +0100
To: "Cheng-Chang Wu" <chengchangwu@yahoo.com>, <relaxng-user@relaxng.org>
From: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] prep.xsl
In-Reply-To: <000a01c382ba$b0381820$2a1942d2@mapa.com.tw>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 17:05:33 -0000

At 00:39 25/09/2003 +0800, Cheng-Chang Wu wrote:
>I'm using xsltproc to split spectest.xml in the test suite. Xsltproc 
>complains it cannot load prep.xsl. Where can I find this file?

Suggest trying on the xsltproc mailing list?
Or one of Daniel's source files?

HTH DaveP



From dpawson@nildram.co.uk Thu Sep 25 00:05:34 2003
Received: from smithers.nildram.co.uk (smithers.nildram.co.uk [195.112.4.34])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OH5Xhf001421
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 00:05:33 +0700 (ICT)
Received: from main.nildram.co.uk (dpawson.gotadsl.co.uk [81.6.251.105])
	by smithers.nildram.co.uk (Postfix) with ESMTP id 1644F25F49B
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 17:59:36 +0100 (BST)
Message-Id: <5.2.0.9.2.20030924175952.00b17598@pop3.Nildram.co.uk>
X-Sender: dpawson@pop3.Nildram.co.uk
X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9
Date: Wed, 24 Sep 2003 18:00:25 +0100
To: relaxng-user@relaxng.org
From: Dave Pawson <dpawson@nildram.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Subject: [relaxng-user] .... And welcome
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 17:05:34 -0000

Test message.


regards DaveP



From bob.ducharme@lexisnexis.com Thu Sep 25 01:49:42 2003
Received: from mx02.lexis-nexis.com (mx02.lexis-nexis.com [207.25.178.45])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OIngin018616
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 01:49:42 +0700 (ICT)
Received: from mailgate2.lexis-nexis.com (mailgate2.lexis-nexis.com
	[138.12.44.45])
	by mx02.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id h8OInp9c010139
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:49:51 -0400
Received: from LNXDAYEXCH06.lexis-nexis.com (lnxdayexch06.lexis-nexis.com
	[138.12.12.59])
	by mailgate2.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id
	h8OInKYm026472
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 14:49:36 -0400
Received: by lnxdayexch06.lexis-nexis.com with Internet Mail Service
	(5.5.2656.59) id <SXVDMCHX>; Wed, 24 Sep 2003 14:45:47 -0400
Message-ID: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C46@lnxdayexch06.lexis-nexis.com>
From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
To: relaxng-user@relaxng.org
Date: Wed, 24 Sep 2003 14:45:39 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="iso-8859-1"
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
Subject: [relaxng-user] Small jar file with org.xml.sax to go with Jing?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 18:49:42 -0000

I just got a Sharp's Linux-based PDA, the Zaurus SL5500, and thought it
would be fun to get jing running on it. I got a NoClassDefFoundError because
it couldn't find org.xml.sax.ErrorHandler. I believe that when I run this on
a Windows machine, jing is finding these classes right in the 1.4 jvm, but
the Zaurus jvm (the Jeode "evm") doesn't have that. I addedxml-apis.jar from
xerces, which has the org.xml.sax classes and isn't very big, but it has
external dependencies for other Xerces classes, and I want to avoid putting
all of Xerces on because it's a PDA and I don't want to take up too much
space with this. Does anyone have any suggestions for a low-footprint jar
file that Jing can use for the sax classes?

thanks,

Bob


From simonstl@simonstl.com Thu Sep 25 02:19:25 2003
Received: from serrano.hesketh.net (mail.hesketh.net [216.27.21.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OJJPgD023514
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 02:19:25 +0700 (ICT)
X-Received-From: simonstl@simonstl.com
X-Delivered-To: <relaxng-user@relaxng.org>
X-Originating-IP: [24.58.125.32]
Received: from 192.168.124.11 (syr-24-58-125-32.twcny.rr.com [24.58.125.32])
	(authenticated bits=0)
	by serrano.hesketh.net (8.12.9p1/8.12.8) with ESMTP id h8OJJ79e024774
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 15:19:09 -0400
X-Spam-Filter: check_local@serrano.hesketh.net by digitalanswers.org
Date: Wed, 24 Sep 2003 15:19:13 -0400
From: "Simon St.Laurent" <simonstl@simonstl.com>
Subject: Re: [relaxng-user] Small jar file with org.xml.sax to go with Jing?
To: relaxng-user@relaxng.org
X-Priority: 3
In-Reply-To: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C46@lnxdayexch06.lexis-nexis.com>
Message-ID: <r02000000-1028-FB89C5AAEEC311D780B20003937A08C2@[192.168.124.11]>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Mailer: Mailsmith 2.0 (Blindsider)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 19:19:26 -0000

bob.ducharme@lexisnexis.com (DuCharme, Bob (LNG-CHO)) writes:
>I just got a Sharp's Linux-based PDA, the Zaurus SL5500, and thought
>it would be fun to get jing running on it. I got a
>NoClassDefFoundError because it couldn't find
>org.xml.sax.ErrorHandler. I believe that when I run this on a Windows
>machine, jing is finding these classes right in the 1.4 jvm, but the
>Zaurus jvm (the Jeode "evm") doesn't have that. I addedxml-apis.jar
>from xerces, which has the org.xml.sax classes and isn't very big, but
>it has external dependencies for other Xerces classes, and I want to
>avoid putting all of Xerces on because it's a PDA and I don't want to
>take up too much space with this. Does anyone have any suggestions for
>a low-footprint jar file that Jing can use for the sax classes?

You might try:
http://sourceforge.net/project/showfiles.php?group_id=29449

Which comes right off of:
http://www.saxproject.org/

I don't think it should have Xerces dependencies, anyway.


From dvd@davidashen.net Thu Sep 25 02:58:50 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OJwkcC029982
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 02:58:48 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8OJuUs0011718
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 00:56:30 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8OJuRhn011717
	for relaxng-user@relaxng.org; Thu, 25 Sep 2003 00:56:27 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309241956.h8OJuRhn011717@adat.davidashen.net>
Subject: Re: [relaxng-user] Small jar file with org.xml.sax to go with Jing?
In-Reply-To: <r02000000-1028-FB89C5AAEEC311D780B20003937A08C2@[192.168.124.11]>
To: relaxng-user@relaxng.org
Date: Thu, 25 Sep 2003 00:56:27 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 19:58:51 -0000

> >it has external dependencies for other Xerces classes, and I want to
> >avoid putting all of Xerces on because it's a PDA and I don't want to
> >take up too much space with this. Does anyone have any suggestions for
> >a low-footprint jar file that Jing can use for the sax classes?
> 
> You might try:
> http://sourceforge.net/project/showfiles.php?group_id=29449
> 
> Which comes right off of:
> http://www.saxproject.org/
> 
> I don't think it should have Xerces dependencies, anyway.

It does not have Xerces dependencies but it does include a SAX2 parser. A parser
is still required; either XP by James Clark (and org.xml.sax.parser property
defined appropriately) should work, or Aelfred2 from gnu jaxp. Both are
small.

David Tolpin
http://davidashen.net/

From ari@cogsci.ed.ac.uk Thu Sep 25 04:58:25 2003
Received: from fbsd-machine.lib.aero (h-69-3-90-48.SNVACAID.covad.net
	[69.3.90.48])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OLwO8Z049189
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 04:58:24 +0700 (ICT)
Received: from fbsd-machine.lib.aero (localhost.lib.aero [127.0.0.1])
	by fbsd-machine.lib.aero (8.12.9/8.12.9) with ESMTP id h8OJpQmr009188
	for <relaxng-user@relaxng.org>; Wed, 24 Sep 2003 12:51:26 -0700 (PDT)
	(envelope-from ari@cogsci.ed.ac.uk)
Received: (from ari@localhost)
	by fbsd-machine.lib.aero (8.12.9/8.12.9/Submit) id h8OJoxGY009183;
	Wed, 24 Sep 2003 12:50:59 -0700 (PDT)
X-Authentication-Warning: fbsd-machine.lib.aero: ari set sender to
	ari@cogsci.ed.ac.uk using -f
Sender: ari@lib.aero
To: xml-dev@lists.xml.org, relaxng-user@relaxng.org
References: <86y8wft83x.fsf@fbsd-machine.lib.aero>
	<20030924115316.GC12899@mercury.ccil.org>
From: ari@cogsci.ed.ac.uk (K. Ari Krupnikov)
In-Reply-To: <20030924115316.GC12899@mercury.ccil.org>
Message-ID: <86d6dqq82k.fsf@fbsd-machine.lib.aero>
Lines: 46
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Cc: 
Subject: [relaxng-user] Re: [xml-dev] A RELAX NG question
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Wed, 24 Sep 2003 21:59:00 -0000
X-Original-Date: 24 Sep 2003 12:50:59 -0700
X-List-Received-Date: Wed, 24 Sep 2003 21:59:00 -0000

This thread has moved to the new relaxng-user list.

John Cowan <cowan@mercury.ccil.org> writes:

> K. Ari Krupnikov scripsit:
> 
> > I have a master RNG file that describes general properties of my
> > grammar, and individual RNG files that describe individual
> > elements. The master file <include>s the individual ones.
> 
> Do you have them separated out merely for ease of maintenance, or do
> you anticipate using different contents for the individual files?

Yes.

I tangle my RNGs from other markup, if you are curious, take a look at
http://cvs.sourceforge.net/viewcvs.py/stng/STnG/literate/

> > Question 1: is this a good way of
> > doing things in RELAX NG, or should I consider a better alternative?
> 
> The obvious alternative would be to avoid the machinery of "define"
> combination, and simply use externalRef to bring in the element patterns
> directly.  This is somewhat more streamlined.

Won't work, I don't think. Any of the elements' CM may need to say
"any element of class foo here," without enumerating members of the
foo class by name or filename -- it can't because it doesn't know
about them. It knows about classes because they are enumerated in the
master file.

> > Question 2: I need to add declarations that would be common to all
> > members of a particular class. An obvious way is to have every element
> > <ref> the common declarations (a group of attributes in this
> > case). Can I do it in one place? DTDs don't provide such a mechanism,
> > XSD does (thought inheritance).
> 
> I don't see that it's any better or worse to have to ref common
> subpatterns than to have to specify a common base type.

I want to specify both in one declaration. It's not an accidental
coincidence that all members of a class have common attributes, it's
part of the meaning of being a part of that class. I was wondering if
there was a way to capture that in RELAX NG.

Ari.

From veillard@redhat.com Thu Sep 25 05:11:19 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OMBJZL051291
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 05:11:19 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h8OMBGs02246;
	Wed, 24 Sep 2003 18:11:16 -0400
Date: Wed, 24 Sep 2003 18:11:16 -0400
From: Daniel Veillard <veillard@redhat.com>
To: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] prep.xsl
Message-ID: <20030924181116.F21529@redhat.com>
References: <000a01c382ba$b0381820$2a1942d2@mapa.com.tw>
	<5.2.0.9.2.20030924180200.00b1c928@pop3.Nildram.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <5.2.0.9.2.20030924180200.00b1c928@pop3.Nildram.co.uk>;
	from dpawson@nildram.co.uk on Wed, Sep 24, 2003 at 06:02:38PM
	+0100
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 22:11:20 -0000

On Wed, Sep 24, 2003 at 06:02:38PM +0100, Dave Pawson wrote:
> At 00:39 25/09/2003 +0800, Cheng-Chang Wu wrote:
> >I'm using xsltproc to split spectest.xml in the test suite. Xsltproc 
> >complains it cannot load prep.xsl. Where can I find this file?
> 
> Suggest trying on the xsltproc mailing list?
> Or one of Daniel's source files?

  Yeah, I'm not sure either how it related to Relax-NG (formatting the
XML spec file ?). I don't have prep.xsl anywhere, I doublt it's directly
related to xsltproc.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From jcowan@reutershealth.com Thu Sep 25 02:41:11 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8OJfBW0027244
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 02:41:11 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id PAA19753; 
	Wed, 24 Sep 2003 15:36:28 -0400 (EDT)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Wed, 24 Sep 2003 15:39:43 -0400
Date: Wed, 24 Sep 2003 15:39:43 -0400
From: John Cowan <jcowan@reutershealth.com>
To: "Simon St.Laurent" <simonstl@simonstl.com>
Subject: Re: [relaxng-user] Small jar file with org.xml.sax to go with Jing?
Message-ID: <20030924193943.GB28066@skunk.reutershealth.com>
References: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C46@lnxdayexch06.lexis-nexis.com>
	<r02000000-1028-FB89C5AAEEC311D780B20003937A08C2@[192.168.124.11]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <r02000000-1028-FB89C5AAEEC311D780B20003937A08C2@[192.168.124.11]>
User-Agent: Mutt/1.4.1i
X-Mailman-Approved-At: Thu, 25 Sep 2003 05:59:30 +0700
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 19:41:12 -0000

Simon St.Laurent scripsit:

> Which comes right off of:
> http://www.saxproject.org/
> 
> I don't think it should have Xerces dependencies, anyway.

Well, that provides the SAX interfaces and helper classes, which are not present
in JVMs before 1.4.  But then you need an actual *parser*, of which the
smallest I know of is Aelfred2.

-- 
"Well, I'm back."  --Sam        John Cowan <jcowan@reutershealth.com>

From dvd@davidashen.net Thu Sep 25 06:09:58 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8ON9s7j061281
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 06:09:56 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8ON7bs0018304
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 04:07:37 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8ON7bUE018303
	for relaxng-user@relaxng.org; Thu, 25 Sep 2003 04:07:37 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309242307.h8ON7bUE018303@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Thu, 25 Sep 2003 04:07:37 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] API?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 24 Sep 2003 23:09:58 -0000

Hi,

I am trying to use relaxng to analyze markup's syntax. Is there a public way
to traverse a loaded grammar? 

I've looked at com.thaiopensource.relaxng.edit. Is it where I should start from?

David

From jjc@jclark.com Thu Sep 25 07:18:56 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8P0IrV5071615
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 07:18:55 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8P0IlY19925
	for <relaxng-user@relaxng.org>; Thu, 25 Sep 2003 07:18:47 +0700
Message-ID: <3F7233B0.5030705@jclark.com>
Date: Thu, 25 Sep 2003 07:15:44 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] Small jar file with org.xml.sax to go with Jing?
References: <200309241956.h8OJuRhn011717@adat.davidashen.net>
In-Reply-To: <200309241956.h8OJuRhn011717@adat.davidashen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 25 Sep 2003 00:18:56 -0000

David Tolpin wrote:

> It does not have Xerces dependencies but it does include a SAX2 parser. A parser
> is still required; either XP by James Clark (and org.xml.sax.parser property
> defined appropriately) should work, or Aelfred2 from gnu jaxp. Both are
> small.

XP isn't maintained and doesn't support SAX2.  IIRC, the GNU jaxp parser 
does not fully implement SAX2 (in that it doesn't allow ContentHandler 
to be set during a parse), which makes it not work with Jing.  I would 
recommend Crimson (available from Apache) as a small and conformant 
parser that works with Jing.

James



From catcode@catcode.com Sat Sep 27 05:40:00 2003
Received: from tengu.host4u.net (tengu.host4u.net [209.150.128.42])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8QMe0CP097545
	for <relaxng-user@relaxng.org>; Sat, 27 Sep 2003 05:40:00 +0700 (ICT)
Received: from localhost (catcode@localhost)
	by tengu.host4u.net (8.11.6/8.11.6) with ESMTP id h8QMchp09433
	for <relaxng-user@relaxng.org>; Fri, 26 Sep 2003 17:38:43 -0500
Date: Fri, 26 Sep 2003 17:38:43 -0500 (CDT)
From: "J. David Eisenberg" <catcode@catcode.com>
X-X-Sender: catcode@tengu.host4u.net
To: relaxng-user@relaxng.org
Message-ID: <Pine.LNX.4.44.0309261730420.8327-100000@tengu.host4u.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [relaxng-user] Teaching Relax NG
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 26 Sep 2003 22:40:01 -0000

I'm teaching a beginning XML course at a local community college, and long 
since decided to teach Relax NG instead of XML Schema (I tell the 
students, "I don't want your heads to explode.")

I was teaching RNG before the compact syntax came on the scene, but this 
semester some students have expressed interest in it.  Over the past two 
days, I wrote a second version of the lecture notes (at 
http://catcode.com/cit041x) to cover compact syntax. [And this is my 
first use of it as well.] My questions:

1) Should instructors emphasize the XML syntax or the compact syntax? The
XML syntax _is_ the official version, and it's the one used by W3C for
SVG, but compact is, well, more compact.

2) If you look at the lecture notes, you'll see that my indenting style is
remarkably schizoid - I was developing my own personal style as I wrote 
the notes. Are there any "Official Relax NG Compact Syntax
Indenting Guidelines"?

-- 
J. David Eisenberg  http://catcode.com/


From jjc@jclark.com Sat Sep 27 14:20:24 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8R7KCmH060647
	for <relaxng-user@relaxng.org>; Sat, 27 Sep 2003 14:20:15 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8R7JvY03655
	for <relaxng-user@relaxng.org>; Sat, 27 Sep 2003 14:19:58 +0700
Message-ID: <3F753989.2050101@jclark.com>
Date: Sat, 27 Sep 2003 14:17:29 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] Teaching Relax NG
References: <Pine.LNX.4.44.0309261730420.8327-100000@tengu.host4u.net>
In-Reply-To: <Pine.LNX.4.44.0309261730420.8327-100000@tengu.host4u.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 27 Sep 2003 07:20:25 -0000

J. David Eisenberg wrote:

> 1) Should instructors emphasize the XML syntax or the compact syntax? The
> XML syntax _is_ the official version, and it's the one used by W3C for
> SVG, but compact is, well, more compact.

I don't really have an answer.  The compact syntax is an OASIS committee 
spec, so it's official too, although it hasn't started on any ISO 
standardization path (yet).  If you do emphasize the compact syntax, I 
think it's important to mention the XML syntax and teach how to get the 
XML syntax from the compact syntax. Apart from that, I would suggest 
emphasizing whichever you think your audience will understand more easily.

> 2) If you look at the lecture notes, you'll see that my indenting style is
> remarkably schizoid - I was developing my own personal style as I wrote 
> the notes. Are there any "Official Relax NG Compact Syntax
> Indenting Guidelines"?

No. You can use trang to indent your RNC by using RNC input and RNC 
output.  I put a fair amount of effort into making trang's RNC output 
indent in a reasonable and systematic way.

The overall objective is to produce a readable schema.  Indentation is 
just one factor that contributes to readability.  I find compact schemas 
easier to read when they are relatively flat.  I prefer schemas that 
follow the following rules:

- always have an implicit top-level grammar

- no nested element patterns; move nested element patterns into separate 
definitions

- any closing ( on the same line as the opening ); if this makes the 
line too long or the expression hard to read, then factor part of the 
expression out into another definition

- closing } either on the same line as the opening { or on a line by 
itself aligned with the start of the keyword before the opening {

James





From cowan@mercury.ccil.org Sun Sep 28 11:37:13 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8S4bDuL003525
	for <relaxng-user@relaxng.org>; Sun, 28 Sep 2003 11:37:13 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1A3TIr-0007Dc-00; Sun, 28 Sep 2003 00:37:01 -0400
Date: Sun, 28 Sep 2003 00:37:01 -0400
To: James Clark <jjc@jclark.com>
Subject: Re: [relaxng-user] Teaching Relax NG
Message-ID: <20030928043701.GB27476@mercury.ccil.org>
References: <Pine.LNX.4.44.0309261730420.8327-100000@tengu.host4u.net>
	<3F753989.2050101@jclark.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3F753989.2050101@jclark.com>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
X-Mailman-Approved-At: Sun, 28 Sep 2003 11:53:59 +0700
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Sep 2003 04:37:15 -0000

James Clark scripsit:

> - always have an implicit top-level grammar

I agree, except for pedagogical examples.

> - no nested element patterns; move nested element patterns into separate 
> definitions

I don't mind nested elements if they are "attribute-like"; simple
content models, not significantly reused.

> - any closing ( on the same line as the opening ); if this makes the 
> line too long or the expression hard to read, then factor part of the 
> expression out into another definition

I don't care much about this point.

> - closing } either on the same line as the opening { or on a line by 
> itself aligned with the start of the keyword before the opening {

The "One True Brace Style" set by the K&R C book.

-- 
Go, and never darken my towels again!           John Cowan
        --Rufus T. Firefly                      www.ccil.org/~cowan

From jjc@jclark.com Sun Sep 28 14:39:04 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8S7d1Fk023596
	for <relaxng-user@relaxng.org>; Sun, 28 Sep 2003 14:39:02 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8S7clL22630
	for <relaxng-user@relaxng.org>; Sun, 28 Sep 2003 14:38:49 +0700
Message-ID: <3F768F62.7000902@jclark.com>
Date: Sun, 28 Sep 2003 14:36:02 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] prep.xsl
References: <000a01c382ba$b0381820$2a1942d2@mapa.com.tw>
In-Reply-To: <000a01c382ba$b0381820$2a1942d2@mapa.com.tw>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 28 Sep 2003 07:39:04 -0000

Cheng-Chang Wu wrote:

> I'm using xsltproc to split spectest.xml in the test suite. Xsltproc 
> complains it cannot load prep.xsl. Where can I find this file?

I think there's a copy in:

http://www.thaiopensource.com/download/gcj/jing-20030619.tar.gz

If you look in the test directory, the Makefile uses xsltproc to split
up spectest.xml.  I'll fix the test suite in the next release to include
this.

James




From chengchangwu@yahoo.com Tue Sep 30 03:34:18 2003
Received: from web41308.mail.yahoo.com (web41308.mail.yahoo.com [66.218.93.57])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8TKYIgg013703
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 03:34:18 +0700 (ICT)
Message-ID: <20030929203411.71513.qmail@web41308.mail.yahoo.com>
Received: from [210.66.25.42] by web41308.mail.yahoo.com via HTTP;
	Mon, 29 Sep 2003 13:34:11 PDT
Date: Mon, 29 Sep 2003 13:34:11 -0700 (PDT)
From: Cheng-Chang Wu <chengchangwu@yahoo.com>
Subject: Re: [relaxng-user] prep.xsl
To: relaxng-user@relaxng.org
In-Reply-To: <3F768F62.7000902@jclark.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Sep 2003 20:34:19 -0000

I've found prep.xsl, thanks for the help.

My program can still not handle all of the relaxng
constructs, but it can already read the relaxng file I
am using in my project.

I've had problems to determine the nullability of ref
element. In section 4.19 of the specification it says
one can replace the expandable ref element with its
definition. THIS MUST NOT RESULT IN A LOOP. I can't
grasp this well. Ex.

<define name="test>
  <choice>
     <ref name="test">
     <element name="test"/>
  </choice>
</define>

Isn't this a correct relaxng schema? I don't know
Java, so I can't find how jing has done it. How can
this be simplified with the simplification rules in
section 4 of the specification?

I havn't done the simplification as the specification
says, will this bring me some trouble in the future?

Thanks for your great job on RelaxNG, it's much better
than any other schema language which I can't
comprehend.

Cheng-Chang


From veillard@redhat.com Tue Sep 30 04:09:22 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8TL9Mch019506
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 04:09:22 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h8TL9Ib22633;
	Mon, 29 Sep 2003 17:09:18 -0400
Date: Mon, 29 Sep 2003 17:09:18 -0400
From: Daniel Veillard <veillard@redhat.com>
To: Cheng-Chang Wu <chengchangwu@yahoo.com>
Subject: Re: [relaxng-user] prep.xsl
Message-ID: <20030929170918.T21529@redhat.com>
References: <3F768F62.7000902@jclark.com>
	<20030929203411.71513.qmail@web41308.mail.yahoo.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <20030929203411.71513.qmail@web41308.mail.yahoo.com>;
	from chengchangwu@yahoo.com on Mon, Sep 29, 2003 at 01:34:11PM
	-0700
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 29 Sep 2003 21:09:22 -0000

On Mon, Sep 29, 2003 at 01:34:11PM -0700, Cheng-Chang Wu wrote:
> I've found prep.xsl, thanks for the help.
> 
> My program can still not handle all of the relaxng
> constructs, but it can already read the relaxng file I
> am using in my project.
> 
> I've had problems to determine the nullability of ref
> element. In section 4.19 of the specification it says
> one can replace the expandable ref element with its
> definition. THIS MUST NOT RESULT IN A LOOP. I can't
> grasp this well. Ex.
> 
> <define name="test>
>   <choice>
>      <ref name="test">
>      <element name="test"/>
>   </choice>
> </define>
> 
> Isn't this a correct relaxng schema? I don't know

The simplest way I could understand the spec was in term of input.
Basically the loop is invalid because it consume no input.
You can go from the top definition of the test define
to the recursive reference without any change in the input.
On the other hand

  <define name="test>
    <choice>
      <element name="bar">
        <ref name="test">
      </element>
      <element name="test"/>
    </choice>
  </define>

 is okay because to go from the definition to the reference
you had to consume the "bar" element input.
Still the best way is to follow the spec description of the semantic
but sometimes taking a different approach can help seeing the 
concept behind the formalism.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From jjc@jclark.com Tue Sep 30 08:59:59 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8U1xvAc059938
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 08:59:58 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h8U1xlL02862; Tue, 30 Sep 2003 08:59:47 +0700
Message-ID: <3F78E2EB.5010200@jclark.com>
Date: Tue, 30 Sep 2003 08:56:59 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Cheng-Chang Wu <chengchangwu@yahoo.com>
Subject: Re: [relaxng-user] prep.xsl
References: <20030929203411.71513.qmail@web41308.mail.yahoo.com>
In-Reply-To: <20030929203411.71513.qmail@web41308.mail.yahoo.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 02:00:01 -0000

Cheng-Chang Wu wrote:

> My program can still not handle all of the relaxng
> constructs, but it can already read the relaxng file I
> am using in my project.
> 
> I've had problems to determine the nullability of ref
> element. In section 4.19 of the specification it says
> one can replace the expandable ref element with its
> definition. THIS MUST NOT RESULT IN A LOOP. I can't
> grasp this well.

Typically, an implementation represents each type of pattern by an 
object.  The schema is thus initially a tree of objects. At a convenient 
point, the implementation typically resolves references: it checks that 
there's a define for each ref and makes each ref pattern point directly 
to that define, and each grammar becomes just a reference to its start 
pattern. At this stage, you have a directed graph of objects.  This 
graph may have cycles (where every cycle passes through a ref pattern). 
  What your implementation has to do is check that every cycle passes 
through an element pattern.  You can do this by having a recursive 
function with a single depth parameter that walks the  graph, recording 
at each ref node the depth at which it last visited the  node, and 
incrementing the depth when it passes through an element node.
See com.thaiopensource.relaxng.impl.RefPattern.checkRecursion() in Jing.

James


From davidc@nag.co.uk Tue Sep 30 20:05:53 2003
Received: from mail22.messagelabs.com (mail22.messagelabs.com [62.231.131.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8UD5rob043912
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 20:05:53 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-17.tower-22.messagelabs.com!1064927148!1162261
X-StarScan-Version: 5.0.7; banners=nag.co.uk,-,-
Received: (qmail 20876 invoked from network); 30 Sep 2003 13:05:48 -0000
Received: from smtp-5.star.net.uk (212.125.75.74)
	by server-17.tower-22.messagelabs.com with SMTP;
	30 Sep 2003 13:05:48 -0000
Received: (qmail 13990 invoked from network); 30 Sep 2003 13:05:19 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-5.star.net.uk with SMTP; 30 Sep 2003 13:05:19 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id OAA14529
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 14:05:09 +0100 (BST)
Date: Tue, 30 Sep 2003 14:01:58 +0100
Message-Id: <200309301301.OAA03980@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id OAA03980;
	Tue, 30 Sep 2003 14:01:58 +0100
From: David Carlisle <davidc@nag.co.uk>
To: relaxng-user@relaxng.org
Subject: [relaxng-user] jing: error: conflicting ID-types
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 13:05:54 -0000


I had a DTD 

    <!ELEMENT x ANY>
    <!ATTLIST x id ID #IMPLIED>

that I wanted to convert to relax ng, trang produced

    x = element x { attlist.x, any }
    attlist.x &= attribute id { xsd:ID }?
    start = x
    any =
      (element * {
         attribute * { text }*,
         any
       }
       | text)*


which seems plausible, but after converting to rng format and trying
with any instance document, say

    <x/>

to be definite, I get

    $ jing id.rng id.xml
    z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"


Removing the  attribute * clause from the any pattern allows the file to
validate, but I do want to allow any element with any attribute.

Am I confused or is Jing?

Thanks for any advice,

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From vdv@dyomedea.com Tue Sep 30 20:25:02 2003
Received: from gwparis.dyomedea.com
	(ASt-Lambert-102-1-1-8.w193-251.abo.wanadoo.fr [193.251.191.8])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UDOxRv046749
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 20:25:01 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by gwparis.dyomedea.com (Postfix) with ESMTP id 494F0192F77
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 15:24:58 +0200 (CEST)
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200309301301.OAA03980@penguin.nag.co.uk>
References: <200309301301.OAA03980@penguin.nag.co.uk>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1064928297.5216.45.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 30 Sep 2003 15:24:58 +0200
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 13:25:04 -0000

Hi David,


On Tue, 2003-09-30 at 15:01, David Carlisle wrote:
> I had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> I had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> 
> to be definite, I get
> 
>     $ jing id.rng id.xml
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
> to be definite, I get
> 
>     $ jing id.rng id.xmlI had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> 
> 
> which seems plausible, but after converting to rng format and trying
> with any instance document, say
> 
>     <x/>
> 
> to be definite, I get
> 
>     $ jing id.rng id.xml
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
>     z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of element "x"
> 
> 
> Removing the  attribute * clause from the any pattern allows the file to
> validate, but I do want to allow any element with any attribute.
> 
> Am I confused or is Jing?

I think you are ;-) ...

I have tried to explain that in my book:

http://books.xmlschemata.org/relaxng/RngNamespaces.html

(search for "A couple of traps to avoid").

Basically, what's happening here is the the DTD compatibility feature
does emulate even its restrictions :-) ...

Hope this helps.

Eric
-- 
Freelance consulting and training.
                                            http://dyomedea.com/english/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From Tom.Gaven@exostar.com Tue Sep 30 20:28:32 2003
Received: from NETMAIL01.exostar.com ([208.47.83.2])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UDSWXS047231
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 20:28:32 +0700 (ICT)
Received: by NETMAIL02.exostar.com with Internet Mail Service (5.5.2653.19)
	id <TG4AJPN3>; Tue, 30 Sep 2003 09:28:26 -0400
Message-ID: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>
From: Tom Gaven <Tom.Gaven@exostar.com>
To: "'David Carlisle'" <davidc@nag.co.uk>, relaxng-user@relaxng.org
Subject: RE: [relaxng-user] jing: error: conflicting ID-types
Date: Tue, 30 Sep 2003 09:28:12 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 13:28:33 -0000


David,

1   x = element x { attlist.x, any }
2    attlist.x &= attribute id { xsd:ID }?
3    start = x
4    any =
5      (element * {
6         attribute * { text }*,
7         any
8       }
9       | text)*


If you desire 'any attribute on element x', then you should probably
remove line 2, and delete 'attlist.x,' from line 1.

This should get rid of your Jing error, and grant your desire.

You may be able to get:
    validate id attribute against ID rule
    and
    grant all other attributes

but you'd probably have to use some choice and except..not syntax...
that is outside my reach at the moment... :)

also, I think trang's conversion of <!ELEMENT x ANY> was a bit too loose in
that it
allowed any attribute as well as any element.

Tom









-----Original Message-----
From: David Carlisle [mailto:davidc@nag.co.uk]
Sent: Tuesday, September 30, 2003 9:02 AM
To: relaxng-user@relaxng.org
Subject: [relaxng-user] jing: error: conflicting ID-types



I had a DTD 

    <!ELEMENT x ANY>
    <!ATTLIST x id ID #IMPLIED>

that I wanted to convert to relax ng, trang produced

    x = element x { attlist.x, any }
    attlist.x &= attribute id { xsd:ID }?
    start = x
    any =
      (element * {
         attribute * { text }*,
         any
       }
       | text)*


which seems plausible, but after converting to rng format and trying
with any instance document, say

    <x/>

to be definite, I get

    $ jing id.rng id.xml
    z:\relaxng\id.rng:22: error: conflicting ID-types for attribute "id" of
element "x"


Removing the  attribute * clause from the any pattern allows the file to
validate, but I do want to allow any element with any attribute.

Am I confused or is Jing?

Thanks for any advice,

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
_______________________________________________
relaxng-user mailing list
relaxng-user@relaxng.org
http://relaxng.org/mailman/listinfo/relaxng-user

From davidc@nag.co.uk Tue Sep 30 20:36:44 2003
Received: from mail22.messagelabs.com (mail22.messagelabs.com [62.231.131.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8UDah3B048447
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 20:36:44 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-8.tower-22.messagelabs.com!1064928996!1173507
X-StarScan-Version: 5.0.7; banners=nag.co.uk,-,-
Received: (qmail 21357 invoked from network); 30 Sep 2003 13:36:36 -0000
Received: from smtp-5.star.net.uk (212.125.75.74)
	by server-8.tower-22.messagelabs.com with SMTP;
	30 Sep 2003 13:36:36 -0000
Received: (qmail 27745 invoked from network); 30 Sep 2003 13:36:36 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-5.star.net.uk with SMTP; 30 Sep 2003 13:36:36 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id OAA15344;
	Tue, 30 Sep 2003 14:36:25 +0100 (BST)
Date: Tue, 30 Sep 2003 14:33:02 +0100
Message-Id: <200309301333.OAA04167@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id OAA04167;
	Tue, 30 Sep 2003 14:33:02 +0100
From: David Carlisle <davidc@nag.co.uk>
To: vdv@dyomedea.com
In-reply-to: <1064928297.5216.45.camel@delleric> (message from Eric van der
	Vlist on Tue, 30 Sep 2003 15:24:58 +0200)
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <200309301301.OAA03980@penguin.nag.co.uk>
	<1064928297.5216.45.camel@delleric>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 13:36:46 -0000


> > Am I confused or is Jing?

> I think you are ;-) ...

Good. That's easier for me to fix!


>  all the other definitions of an attribute "id" hosted by an element
>  "book" must have the same type "ID".

Ah. thanks,

Hmm I think I'll just declare my id attribute as text or xsd:NCName or
something and give up on this  xsd:ID business.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From davidc@nag.co.uk Tue Sep 30 20:52:09 2003
Received: from mail22.messagelabs.com (mail22.messagelabs.com [62.231.131.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8UDq9kI051034
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 20:52:09 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-26.tower-22.messagelabs.com!1064929922!1156095
X-StarScan-Version: 5.0.7; banners=nag.co.uk,-,-
Received: (qmail 25952 invoked from network); 30 Sep 2003 13:52:02 -0000
Received: from smtp-4.star.net.uk (212.125.75.73)
	by server-26.tower-22.messagelabs.com with SMTP;
	30 Sep 2003 13:52:02 -0000
Received: (qmail 31015 invoked from network); 30 Sep 2003 13:52:01 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-4.star.net.uk with SMTP; 30 Sep 2003 13:52:01 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id OAA15694;
	Tue, 30 Sep 2003 14:51:45 +0100 (BST)
Date: Tue, 30 Sep 2003 14:48:16 +0100
Message-Id: <200309301348.OAA04245@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id OAA04245;
	Tue, 30 Sep 2003 14:48:16 +0100
From: David Carlisle <davidc@nag.co.uk>
To: Tom.Gaven@exostar.com
In-reply-to: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>
	(message from Tom Gaven on Tue, 30 Sep 2003 09:28:12 -0400)
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 13:52:11 -0000


> If you desire 'any attribute on element x', then you should probably
> remove line 2, and delete 'attlist.x,' from line 1.

No I wanted control over the attributes, but to allow any element.
Which was the intent of the original DTD

    <!ELEMENT x ANY>
    <!ATTLIST x id ID #IMPLIED>

However Eric has pointed out that while the _intent_ of that DTD was to
allow anything as a child of that DTD (essentially it's an "annotation
from some foreign vocabulary wrapper) actually there would be a
restriction that any element called x that is included as a result of
that ANY had better have an id attribute of type ID, and the relax ng
version picks up that constraint as unlike xsd you can't apparently skip
a chunk of well formed xml so you have to actually declare the grammar
of the contained elments and you end you with text conflicting with
xsd:ID.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From dvd@davidashen.net Tue Sep 30 21:26:49 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UEQkNK056927
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 21:26:48 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8UENqs0051505
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 19:23:52 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8UENqpB051504
	for relaxng-user@relaxng.org; Tue, 30 Sep 2003 19:23:52 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309301423.h8UENqpB051504@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Tue, 30 Sep 2003 19:23:52 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] examples of application of interleave?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 14:26:51 -0000

Hi,

I have difficulty trying to find real-life examples of application of 'interleave'.
Where can I look at a schema with it?

David Tolpin
http://davidashen.net/

From vdv@dyomedea.com Tue Sep 30 21:38:08 2003
Received: from gwparis.dyomedea.com
	(ASt-Lambert-102-1-1-8.w193-251.abo.wanadoo.fr [193.251.191.8])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UEc5K0058826
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 21:38:07 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by gwparis.dyomedea.com (Postfix) with ESMTP id C850B19329B
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 16:38:04 +0200 (CEST)
Subject: Re: [relaxng-user] examples of application of interleave?
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200309301423.h8UENqpB051504@adat.davidashen.net>
References: <200309301423.h8UENqpB051504@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1064932684.5188.74.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 30 Sep 2003 16:38:04 +0200
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 14:38:08 -0000

On Tue, 2003-09-30 at 16:23, David Tolpin wrote:
> Hi,
> 
> I have difficulty trying to find real-life examples of application of 'interleave'.
> Where can I look at a schema with it?

Any document oriented application (such as XHTML 2.0 [1]) contain good
examples, but I do believe that data oriented applications should take
advantage of this feature too even though there are probably less
examples in this domain.

[1] http://www.w3.org/TR/xhtml2/xhtml20_relax.html

Eric
-- 
Don't you think all these XML schema languages should work together?
                                                         http://dsdl.org
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From veillard@redhat.com Tue Sep 30 21:41:30 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UEfUa4059341
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 21:41:30 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h8UEeLa01736;
	Tue, 30 Sep 2003 10:40:21 -0400
Date: Tue, 30 Sep 2003 10:40:21 -0400
From: Daniel Veillard <veillard@redhat.com>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] examples of application of interleave?
Message-ID: <20030930104021.Q21529@redhat.com>
References: <200309301423.h8UENqpB051504@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <200309301423.h8UENqpB051504@adat.davidashen.net>;
	from dvd@davidashen.net on Tue, Sep 30, 2003 at 07:23:52PM +0500
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 14:41:30 -0000

On Tue, Sep 30, 2003 at 07:23:52PM +0500, David Tolpin wrote:
> Hi,
> 
> I have difficulty trying to find real-life examples of application of 'interleave'.
> Where can I look at a schema with it?

  Isn't the example from chapter 8 of the tutorial "real-life" enough ?
  http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html#IDAN1YR

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From dvd@davidashen.net Tue Sep 30 21:53:56 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UErqDB061305
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 21:53:54 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8UEoxs0051669
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 19:50:59 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8UEoxR3051668
	for relaxng-user@relaxng.org; Tue, 30 Sep 2003 19:50:59 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309301450.h8UEoxR3051668@adat.davidashen.net>
Subject: Re: [relaxng-user] examples of application of interleave?
In-Reply-To: <1064932684.5188.74.camel@delleric>
To: relaxng-user@relaxng.org
Date: Tue, 30 Sep 2003 19:50:59 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 14:53:57 -0000

> On Tue, 2003-09-30 at 16:23, David Tolpin wrote:
> > Hi,
> > 
> > I have difficulty trying to find real-life examples of application of 'interleave'.
> > Where can I look at a schema with it?
> 
> Any document oriented application (such as XHTML 2.0 [1]) contain good
> examples, but I do believe that data oriented applications should take
> advantage of this feature too even though there are probably less
> examples in this domain.
> 
> [1] http://www.w3.org/TR/xhtml2/xhtml20_relax.html

The only use for interleave in XHTML 2.0 is to combine header.contents from various
modules; and in this context there is no order significance within the patterns
to be combined. This part can be done easily without interleave.

I am trying to solve a problem for which every construct must be converted into a
set of productions and am having difficulty translating interleave into a set
of productions in general case. It is possible and easy in general, but complicates
my particular algorithm. 

I am considering dropping interleave and trying to find out what kind of grammars
will be beyond the scope. I haven't yet seen one.

David

From bob.ducharme@lexisnexis.com Tue Sep 30 21:56:11 2003
Received: from mx02.lexis-nexis.com (mx02.lexis-nexis.com [207.25.178.45])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UEuAW4061692
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 21:56:11 +0700 (ICT)
Received: from mailgate2.lexis-nexis.com (mailgate2.lexis-nexis.com
	[138.12.44.45])
	by mx02.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id h8UEuKFG014111
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 10:56:21 -0400
Received: from LNXDAYEXCH06.lexis-nexis.com (lnxdayexch06.lexis-nexis.com
	[138.12.12.59])
	by mailgate2.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id
	h8UEu4vT012028
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 10:56:05 -0400
Received: by lnxdayexch06.lexis-nexis.com with Internet Mail Service
	(5.5.2656.59) id <SXVDMPMW>; Tue, 30 Sep 2003 10:56:03 -0400
Message-ID: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C84@lnxdayexch06.lexis-nexis.com>
From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
To: relaxng-user@relaxng.org
Subject: RE: [relaxng-user] examples of application of interleave?
Date: Tue, 30 Sep 2003 10:56:03 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="iso-8859-1"
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 14:56:11 -0000

>> I have difficulty trying to find real-life examples of application of
'interleave'.
>> Where can I look at a schema with it?

>Any document oriented application (such as XHTML 2.0 [1]) contain good
>examples, but I do believe that data oriented applications should take
>advantage of this feature too even though there are probably less
>examples in this domain.

I see it the other way around: to me, ordering matters more in
document-oriented applications, but less in data-oriented applications. If a
relational table has columns for firstName, lastName, empNum, homePhone,
officePhone, hireDate, etc., the ordering of their XML equivalents inside of
an element that represents a row of that table really doesn't matter to me,
and probably doesn't to an importing application. I'll bet there are plenty
of examples there. 

Bob DuCharme          www.snee.com/bob           <bob@  
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii

From vdv@dyomedea.com Tue Sep 30 22:02:07 2003
Received: from gwparis.dyomedea.com
	(ASt-Lambert-102-1-1-8.w193-251.abo.wanadoo.fr [193.251.191.8])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UF1uZE062928
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:02:03 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by gwparis.dyomedea.com (Postfix) with ESMTP id 4FF4019374E
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 17:01:50 +0200 (CEST)
Subject: Re: [relaxng-user] examples of application of interleave?
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200309301450.h8UEoxR3051668@adat.davidashen.net>
References: <200309301450.h8UEoxR3051668@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1064934110.5191.86.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 30 Sep 2003 17:01:50 +0200
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 15:02:10 -0000

On Tue, 2003-09-30 at 16:50, David Tolpin wrote:
> > On Tue, 2003-09-30 at 16:23, David Tolpin wrote:
> > > Hi,
> > > 
> > > I have difficulty trying to find real-life examples of application of 'interleave'.
> > > Where can I look at a schema with it?
> > 
> > Any document oriented application (such as XHTML 2.0 [1]) contain good
> > examples, but I do believe that data oriented applications should take
> > advantage of this feature too even though there are probably less
> > examples in this domain.
> > 
> > [1] http://www.w3.org/TR/xhtml2/xhtml20_relax.html
> 
> The only use for interleave in XHTML 2.0 is to combine header.contents from various
> modules;

There is also an hidden use of "interleave" in each "mixed" template
since "mixed" is a shortcut for "interleave" with a "text" pattern.

>  and in this context there is no order significance within the patterns
> to be combined. This part can be done easily without interleave.

How can you do this (I mean combining without order) without interleave?

> I am trying to solve a problem for which every construct must be converted into a
> set of productions and am having difficulty translating interleave into a set
> of productions in general case. It is possible and easy in general, but complicates
> my particular algorithm. 

Interleave does complicate the algorithm, that's why it has been kept
away from other schema languages, but it gives a flexibility to users
which is unique amongst schema languages...

> I am considering dropping interleave and trying to find out what kind of grammars
> will be beyond the scope. I haven't yet seen one.

Again, any mixed content model is in this scope.

Eric
-- 
See you in Philadelphia for XML 2003.
                                    http://www.xmlconference.org/xmlusa/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From Kohsuke.Kawaguchi@Sun.COM Tue Sep 30 22:07:55 2003
Received: from brmea-mail-2.sun.com (brmea-mail-2.Sun.COM [192.18.98.43])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UF7svT063908
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:07:55 +0700 (ICT)
Received: from esunmail ([129.147.156.34])
	by brmea-mail-2.sun.com (8.12.10/8.12.9) with ESMTP id h8UF7rxK002453
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 09:07:53 -0600 (MDT)
Received: from xpa-fe1 (esunmail [129.147.156.34]) by edgemail1.Central.Sun.COM
	(iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003))
	with ESMTP id <0HM1001NJ8P497@edgemail1.Central.Sun.COM> for
	relaxng-user@relaxng.org; Tue, 30 Sep 2003 09:07:52 -0600 (MDT)
Received: from [129.145.133.94] by mail.sun.net
	(iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003))
	with ESMTP id <0HM100ERH8P3ZS@mail.sun.net> for
	relaxng-user@relaxng.org; Tue, 30 Sep 2003 09:07:52 -0600 (MDT)
Date: Tue, 30 Sep 2003 08:07:52 -0700
From: Kohsuke KAWAGUCHI <kk@kohsuke.org>
In-reply-to: <200309301450.h8UEoxR3051668@adat.davidashen.net>
To: relaxng-user@relaxng.org
Message-id: <20030930080749.1736.KK@kohsuke.org>
MIME-version: 1.0
X-Mailer: Becky! ver. 2.06.02
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <1064932684.5188.74.camel@delleric>
	<200309301450.h8UEoxR3051668@adat.davidashen.net>
Subject: [relaxng-user] Re: examples of application of interleave?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 15:07:56 -0000


> The only use for interleave in XHTML 2.0 is to combine header.contents from various
> modules; and in this context there is no order significance within the patterns
> to be combined. This part can be done easily without interleave.

HTML <header> is another example. You can have things like
<meta>,<title>,<script>,<link>,... in any order, but you can have at
most one <title>.


Sounds like you are trying to implement a RELAX NG processor, and if so,
I wonder what is the point in adopting an algorithm that is known to be
incapable of supporting full RELAX NG.

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi@sun.com


From vdv@dyomedea.com Tue Sep 30 22:09:39 2003
Received: from gwparis.dyomedea.com
	(ASt-Lambert-102-1-1-8.w193-251.abo.wanadoo.fr [193.251.191.8])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UF9b26064311
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:09:38 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by gwparis.dyomedea.com (Postfix) with ESMTP id 10D3A1938D4
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 17:09:35 +0200 (CEST)
Subject: RE: [relaxng-user] examples of application of interleave?
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C84@lnxdayexch06.lexis-nexis.com>
References: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52C84@lnxdayexch06.lexis-nexis.com>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1064934575.5191.95.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 30 Sep 2003 17:09:35 +0200
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 15:09:39 -0000

On Tue, 2003-09-30 at 16:56, DuCharme, Bob (LNG-CHO) wrote:
> >> I have difficulty trying to find real-life examples of application of
> 'interleave'.
> >> Where can I look at a schema with it?
> 
> >Any document oriented application (such as XHTML 2.0 [1]) contain good
> >examples, but I do believe that data oriented applications should take
> >advantage of this feature too even though there are probably less
> >examples in this domain.
> 
> I see it the other way around: to me, ordering matters more in
> document-oriented applications, but less in data-oriented applications. If a
> relational table has columns for firstName, lastName, empNum, homePhone,
> officePhone, hireDate, etc., the ordering of their XML equivalents inside of
> an element that represents a row of that table really doesn't matter to me,
> and probably doesn't to an importing application. I'll bet there are plenty
> of examples there. 

I thin that there is a misunderstanding here and that many users think
that "unordered" models are models where the order doesn't matter which
is very reductive.

What we often call unordered models are models where the schema doesn't
enforce the order and that doesn't mean that the order shouldn't be
considered significant for the application, on the contrary, the fact
that two elements may appear in any order may bring additional
information.

For instance, if I write:

person = element last-name{text}, element first-name{text}

The fact that I enforce a specific order means that I don't know if the
person prefers to get his/her first name before his/her last name, while
if I write:

person = element last-name{text}& element first-name{text},

I can write in my instance document either

<last-name>DuCharme</last-name><first-name>Bob</first-name>

or

<first-name>Bob</first-name><last-name>DuCharme</last-name>

In this case, this "lack" of order is an information by itself!

So, I think that in fact we all agree here :-) ...

Eric

> Bob DuCharme          www.snee.com/bob           <bob@  
> snee.com>  "The elements be kind to thee, and make thy
> spirits all of comfort!" Anthony and Cleopatra, III ii
> _______________________________________________
> relaxng-user mailing list
> relaxng-user@relaxng.org
> http://relaxng.org/mailman/listinfo/relaxng-user
-- 
If you have a XML document, you have its schema.
                                                  http://examplotron.org
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From davidc@nag.co.uk Tue Sep 30 22:24:54 2003
Received: from mail22.messagelabs.com (mail22.messagelabs.com [62.231.131.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h8UFOs9v067164
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:24:54 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-28.tower-22.messagelabs.com!1064935491!1171272
X-StarScan-Version: 5.0.7; banners=nag.co.uk,-,-
Received: (qmail 25027 invoked from network); 30 Sep 2003 15:24:51 -0000
Received: from smtp-4.star.net.uk (212.125.75.73)
	by server-28.tower-22.messagelabs.com with SMTP;
	30 Sep 2003 15:24:51 -0000
Received: (qmail 18158 invoked from network); 30 Sep 2003 15:24:48 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-4.star.net.uk with SMTP; 30 Sep 2003 15:24:48 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id QAA17779
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 16:24:34 +0100 (BST)
Date: Tue, 30 Sep 2003 16:20:36 +0100
Message-Id: <200309301520.QAA04797@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id QAA04797;
	Tue, 30 Sep 2003 16:20:36 +0100
From: David Carlisle <davidc@nag.co.uk>
To: relaxng-user@relaxng.org
In-reply-to: <200309301348.OAA04245@penguin.nag.co.uk> (message from David
	Carlisle on Tue, 30 Sep 2003 14:48:16 +0100)
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>
	<200309301348.OAA04245@penguin.nag.co.uk>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 15:24:55 -0000


Just to tie up this thread, unless anyone has any better suggestions I'm
planning to use this

    default namespace om  = "http://www.openmath.org/OpenMath"
    
    start = y
    
    x = element x { attlist.om, (om|notom)* }
    
    y = element y { attlist.om, (x | y)* }
    
    attlist.om = attribute id { xsd:ID }?
    
    
    om = (x|y)
    
    notom =
      (element * - om:* {
         attribute * { text }*,
         notom
       }
       | text)
    


Which I believe says that both OpenMath elements take an attribute id of
type ID and the content of x can be any non OpenMath element
or valid OpenMath. Which is of course what I really wanted to say all
along:-)

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From jcowan@reutershealth.com Tue Sep 30 23:11:24 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UGBIOU075265
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 23:11:19 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id MAA27193; 
	Tue, 30 Sep 2003 12:05:46 -0400 (EDT)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Tue, 30 Sep 2003 12:10:15 -0400
Date: Tue, 30 Sep 2003 12:10:15 -0400
From: John Cowan <jcowan@reutershealth.com>
To: David Carlisle <davidc@nag.co.uk>
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
Message-ID: <20030930161015.GC19883@skunk.reutershealth.com>
References: <200309301301.OAA03980@penguin.nag.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200309301301.OAA03980@penguin.nag.co.uk>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 16:11:24 -0000

David Carlisle scripsit:
> 
> I had a DTD 
> 
>     <!ELEMENT x ANY>
>     <!ATTLIST x id ID #IMPLIED>
> 
> that I wanted to convert to relax ng, trang produced
> 
>     x = element x { attlist.x, any }
>     attlist.x &= attribute id { xsd:ID }?
>     start = x
>     any =
>       (element * {
>          attribute * { text }*,
>          any
>        }
>        | text)*
> Am I confused or is Jing?

The fault is with Trang, and yet it's hard to see how it could do any
better without taking an entirely different approach.

The semantics of ANY in a DTD are essentially (#PCDATA|FOO|BAR|BAZ|...)*,
where FOO, BAR, BAZ, ... are the declared elements in the DTD.  It does
not mean that "any XML" is permissible here, but that's how Trang
translates it.

Consequently, the declaration of the element named "x" as having an "id"
attribute of type ID conflicts with the implicit declaration of "x" (as
part of the element wildcard) as having an "id" attribute (as part of the
attribute wildcard) of type text.  Normally, this wouldn't matter, but
the semantics of type ID are global, and RNG requires that ID-declared
attributes be consistent throughout the document.

Here is an RNC schema that should do what you want:

     x = element x { attlist.x & not-x* & x* & text}
     attlist.x &= attribute id { xsd:ID }?
     start = x
     not-x = element (* - x) { attribute * {text}* & not-x* & x* & text }

-- 
John Cowan  jcowan@reutershealth.com  www.reutershealth.com  www.ccil.org/~cowan
Consider the matter of Analytic Philosophy.  Dennett and Bennett are well-known.
Dennett rarely or never cites Bennett, so Bennett rarely or never cites Dennett.
There is also one Dummett.  By their works shall ye know them.  However, just as
no trinities have fourth persons (Zeppo Marx notwithstanding), Bummett is hardly
known by his works.  Indeed, Bummett does not exist.  It is part of the function
of this and other e-mail messages, therefore, to do what they can to create him.

From Kohsuke.Kawaguchi@Sun.COM Tue Sep 30 22:05:12 2003
Received: from brmea-mail-3.sun.com (brmea-mail-3.Sun.COM [192.18.98.34])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UF5BSl063459
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:05:11 +0700 (ICT)
Received: from esunmail ([129.147.156.34])
	by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id h8UF55kv021084
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 09:05:05 -0600 (MDT)
Received: from xpa-fe1 (esunmail [129.147.156.34]) by edgemail1.Central.Sun.COM
	(iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003))
	with ESMTP id <0HM1001MF8KE98@edgemail1.Central.Sun.COM> for
	relaxng-user@relaxng.org; Tue, 30 Sep 2003 09:05:03 -0600 (MDT)
Received: from [129.145.133.94] by mail.sun.net
	(iPlanet Messaging Server 5.2 HotFix 1.16 (built May 14 2003))
	with ESMTP id <0HM100EZL8KEX7@mail.sun.net> for
	relaxng-user@relaxng.org; Tue, 30 Sep 2003 09:05:02 -0600 (MDT)
Date: Tue, 30 Sep 2003 08:05:03 -0700
From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi@Sun.COM>
In-reply-to: <200309301450.h8UEoxR3051668@adat.davidashen.net>
To: relaxng-user@relaxng.org
Message-id: <20030930080215.1732.KOHSUKE.KAWAGUCHI@sun.com>
MIME-version: 1.0
X-Mailer: Becky! ver. 2.06.02
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <1064932684.5188.74.camel@delleric>
	<200309301450.h8UEoxR3051668@adat.davidashen.net>
X-Mailman-Approved-At: Tue, 30 Sep 2003 23:30:40 +0700
Subject: [relaxng-user] Re: examples of application of interleave?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 15:05:12 -0000


> The only use for interleave in XHTML 2.0 is to combine header.contents from various
> modules; and in this context there is no order significance within the patterns
> to be combined. This part can be done easily without interleave.

HTML <header> is another example. You can have things like
<meta>,<title>,<script>,<link>,... in any order, but you can have at
most one <title>.


Sounds like you are trying to implement a RELAX NG processor, and if so,
I wonder what is the point in adopting an algorithm that is known to be
incapable of supporting full RELAX NG.

regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi@sun.com


From dvd@davidashen.net Wed Oct  1 00:09:23 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UH9IMl085578
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 00:09:20 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8UH6Os0052280
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:06:24 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8UH6O2x052279
	for relaxng-user@relaxng.org; Tue, 30 Sep 2003 22:06:24 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309301706.h8UH6O2x052279@adat.davidashen.net>
Subject: Re: [relaxng-user] Re: examples of application of interleave?
In-Reply-To: <20030930080215.1732.KOHSUKE.KAWAGUCHI@sun.com>
To: relaxng-user@relaxng.org
Date: Tue, 30 Sep 2003 22:06:24 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 17:09:25 -0000

> 
> Sounds like you are trying to implement a RELAX NG processor, and if so,
> I wonder what is the point in adopting an algorithm that is known to be
> incapable of supporting full RELAX NG.
> 

No, I am trying to use jing (actually, one modified for use with
rng2srng just because relaxng/impl is good for walking the graph
and is not public in the original jing) as a toolkit to parse schemas
to build LR parser on top of a markup for a language where elements
of original markup are symbols (and elements with no content or
text-only content are terminals). I am therefore trying to develop
algorithm that approximates a schema with a context-free grammar
as close as possible. I realize that a new method can be developed
to build an LR parsing algorithm for a language derived from the full
RNG but this is beyond my domain of interest now.

All markup schemas I looked at can either be trivially rewritten
without interleave or use interleave with exactly one element in
one of two branches. These cases require a much simpler implementation
than the general case.

I am now (with the examples brought) even more convinced that
interleave as a language tool is a solution looking for a problem;
it lets users define languages which are great for validation by
RNG but significantly complicate certain other operations beyond 
the scope of validation.

I will be trying to find a solution, but not too hard. Loosening
the grammar just a bit will solve my problem and give me a good
tool. 

David Tolpin
http://davidashen.net/




From dvd@davidashen.net Wed Oct  1 01:01:43 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UI1dE9094551
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 01:01:42 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h8UHwjs0052582
	for <relaxng-user@relaxng.org>; Tue, 30 Sep 2003 22:58:45 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h8UHwj2d052581
	for relaxng-user@relaxng.org; Tue, 30 Sep 2003 22:58:45 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200309301758.h8UHwj2d052581@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Tue, 30 Sep 2003 22:58:45 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] Applications of relaxng
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 18:01:44 -0000

It is my impression that Relax NG, as well as other modern schema languages,
is implemented with idea in mind that a schema is a validation tool. Yet, in
my opinion, this application should not be the only one. It is not even
the most important one.

There are many more things that must be done with formally defined XML languages
than validation; Relax NG as it currently specified and implemented, does not
make those other things easier. 

Nor any other schema, to say the truth.

David


From jcowan@reutershealth.com Wed Oct  1 01:18:26 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h8UIIJuq097121
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 01:18:25 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id OAA28587; 
	Tue, 30 Sep 2003 14:09:36 -0400 (EDT)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Tue, 30 Sep 2003 14:14:01 -0400
Date: Tue, 30 Sep 2003 14:14:01 -0400
From: John Cowan <jcowan@reutershealth.com>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] Applications of relaxng
Message-ID: <20030930181401.GI19883@skunk.reutershealth.com>
References: <200309301758.h8UHwj2d052581@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200309301758.h8UHwj2d052581@adat.davidashen.net>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 30 Sep 2003 18:18:26 -0000

David Tolpin scripsit:

> There are many more things that must be done with formally defined XML languages
> than validation; 

Give us your list of things, then.

-- 
Business before pleasure, if not too bloomering long before.
        --Nicholas van Rijn
                John Cowan <jcowan@reutershealth.com>
                        http://www.ccil.org/~cowan  http://www.reutershealth.com

From jjc@jclark.com Wed Oct  1 08:07:57 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h9117sWE061096
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 08:07:55 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9117lL10226
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 08:07:47 +0700
Message-ID: <3F7A283A.9010802@jclark.com>
Date: Wed, 01 Oct 2003 08:04:58 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] Applications of relaxng
References: <200309301758.h8UHwj2d052581@adat.davidashen.net>
In-Reply-To: <200309301758.h8UHwj2d052581@adat.davidashen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2003 01:07:59 -0000

David Tolpin wrote:

> It is my impression that Relax NG, as well as other modern schema languages,
> is implemented with idea in mind that a schema is a validation tool.

Not exactly. I see the role of a schema language as being to define the 
interface between components that communicate using XML.  Validation is 
one aspect of this: it's runtime checking of compliance with the 
interface.  I think it's important that when you have an interface you 
can mechanically enforce it.  But more important than this is just the 
fact of having an interface that is rigorously defined, yet human 
understandable.  If all you have to define your interface is English 
prose, it is very likely that different people will interpret it 
slightly differently.  If all you have is XSD, then you had better have 
a tool like XMLSpy if you want people to understand it.

For a schema language to work well in this role, as an XML processing 
component interface definition language, it's vital that the schema 
language doesn't do anything other than define a set of XML documents. 
If a schema does other random stuff useful for processing (like tell you 
how to turn the XML document into Java objects or add default 
attributes), then it's making the components that use it as an interface 
unnecessarily tightly coupled.  Maybe it's wishful thinking on my part, 
but I see a growing realization of this point in the move towards 
service-oriented architectures and "typeless" web services.

James


From jjc@jclark.com Wed Oct  1 14:32:02 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h917VxPb005519
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 14:32:00 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h917VoL11867
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 14:31:50 +0700
Message-ID: <3F7A823A.2080603@jclark.com>
Date: Wed, 01 Oct 2003 14:28:58 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <200309301301.OAA03980@penguin.nag.co.uk>
	<20030930161015.GC19883@skunk.reutershealth.com>
In-Reply-To: <20030930161015.GC19883@skunk.reutershealth.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2003 07:32:02 -0000

John Cowan wrote:

> The fault is with Trang, and yet it's hard to see how it could do any
> better without taking an entirely different approach.
> 
> The semantics of ANY in a DTD are essentially (#PCDATA|FOO|BAR|BAZ|...)*,
> where FOO, BAR, BAZ, ... are the declared elements in the DTD.  It does
> not mean that "any XML" is permissible here, but that's how Trang
> translates it.

Right.  But DTDs don't have real wildcards, so if a DTD author wants a 
real wildcard, the best they can do is approximate it with ANY.  Most of 
the uses of ANY I've come across are cases of this, rather than people 
actually wanting the DTD semantics.

In any case, if you want exactly the DTD semantics, trang can give it to 
you. See the -i strict-any option:

  http://www.thaiopensource.com/relaxng/trang-manual.html#dtd-input

James



From jjc@jclark.com Wed Oct  1 14:39:21 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h917dJvW006258
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 14:39:20 +0700 (ICT)
Received: from jclark.com ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h917d1L11902; Wed, 1 Oct 2003 14:39:01 +0700
Message-ID: <3F7A83E9.4030302@jclark.com>
Date: Wed, 01 Oct 2003 14:36:09 +0700
From: James Clark <jjc@jclark.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: David Carlisle <davidc@nag.co.uk>
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>	<200309301348.OAA04245@penguin.nag.co.uk>
	<200309301520.QAA04797@penguin.nag.co.uk>
In-Reply-To: <200309301520.QAA04797@penguin.nag.co.uk>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2003 07:39:21 -0000

David Carlisle wrote:
> Just to tie up this thread, unless anyone has any better suggestions I'm
> planning to use this
> 
>     default namespace om  = "http://www.openmath.org/OpenMath"
>     
>     start = y
>     
>     x = element x { attlist.om, (om|notom)* }
>     
>     y = element y { attlist.om, (x | y)* }
>     
>     attlist.om = attribute id { xsd:ID }?
>     
>     
>     om = (x|y)
>     
>     notom =
>       (element * - om:* {
>          attribute * { text }*,
>          notom
>        }
>        | text)
>     
> 
> 
> Which I believe says that both OpenMath elements take an attribute id of
> type ID and the content of x can be any non OpenMath element
> or valid OpenMath. Which is of course what I really wanted to say all
> along:-)

Don't you want non-OpenMath elements to be able to contain valid 
OpenMath elements as descendants?  In any case, don't you want a * on 
the reference to notom in the definition of notom?

James


From davidc@nag.co.uk Wed Oct  1 16:39:24 2003
Received: from mail22.messagelabs.com (mail22.messagelabs.com [62.231.131.211])
	by thaiopensource.com (8.12.9p1/8.11.2) with SMTP id h919dNS6019079
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 16:39:24 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-11.tower-22.messagelabs.com!1065001003!1195472
X-StarScan-Version: 5.0.7; banners=nag.co.uk,-,-
Received: (qmail 27519 invoked from network); 1 Oct 2003 09:36:43 -0000
Received: from smtp-5.star.net.uk (212.125.75.74)
	by server-11.tower-22.messagelabs.com with SMTP;
	1 Oct 2003 09:36:43 -0000
Received: (qmail 27360 invoked from network); 1 Oct 2003 09:36:42 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-5.star.net.uk with SMTP; 1 Oct 2003 09:36:42 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id KAA03827;
	Wed, 1 Oct 2003 10:36:35 +0100 (BST)
Date: Wed, 1 Oct 2003 10:34:26 +0100
Message-Id: <200310010934.KAA10830@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id KAA10830;
	Wed, 1 Oct 2003 10:34:26 +0100
From: David Carlisle <davidc@nag.co.uk>
To: jjc@jclark.com
In-reply-to: <3F7A83E9.4030302@jclark.com> (message from James Clark on Wed,
	01 Oct 2003 14:36:09 +0700)
Subject: Re: [relaxng-user] jing: error: conflicting ID-types
References: <08AE6B9487F960468A915ECA3C29E1AC0556128C@NETMAIL02.exostar.com>	<200309301348.OAA04245@penguin.nag.co.uk>
	<200309301520.QAA04797@penguin.nag.co.uk>
	<3F7A83E9.4030302@jclark.com>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2003 09:39:24 -0000



> Don't you want non-OpenMath elements to be able to contain valid 
> OpenMath elements as descendants? 


Yes thanks, I noticed that. I'm not sure that I do, to be honest.

However this is more a language design issue rather than a relax
question. It's now clear that whatever I decide here I can express it in
relax, so I'm happy.

>  In any case, don't you want a * on 
> the reference to notom in the definition of notom?

er, yes:-)

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From EB2M-MRT@asahi-net.or.jp Wed Oct  1 20:13:39 2003
Received: from mail.asahi-net.or.jp (mail1.asahi-net.or.jp [202.224.39.197])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h91DDYsf045185
	for <relaxng-user@relaxng.org>; Wed, 1 Oct 2003 20:13:39 +0700 (ICT)
Received: from [127.0.0.1] (g037046.ppp.asahi-net.or.jp [211.132.37.46])
	by mail.asahi-net.or.jp (Postfix) with ESMTP
	id 40710AFF6; Wed,  1 Oct 2003 22:13:32 +0900 (JST)
Date: Wed, 01 Oct 2003 22:10:49 +0900
From: "MURATA Makoto (FAMILY Given)" <EB2M-MRT@asahi-net.or.jp>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] Applications of relaxng
In-Reply-To: <200309301758.h8UHwj2d052581@adat.davidashen.net>
References: <200309301758.h8UHwj2d052581@adat.davidashen.net>
Message-Id: <20031001220300.472D.EB2M-MRT@asahi-net.or.jp>
MIME-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Mailer: Becky! ver. 2.06.02
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 01 Oct 2003 13:13:44 -0000


On Tue, 30 Sep 2003 22:58:45 +0500 (AMST)
David Tolpin <dvd@davidashen.net> wrote:

> It is my impression that Relax NG, as well as other modern schema languages,
> is implemented with idea in mind that a schema is a validation tool. Yet, in
> my opinion, this application should not be the only one. It is not even
> the most important one.

In parallel to the development of RELAX NG, two data-binding tools, namely 
Relaxer and RelaxNGCC were implemented.  Moreover, the designer (Hosoya-san) of 
XDuce (a functional programming language equipped with schemas as types) also 
contributed to the design of RELAX NG.  We also paid a lot of attention to 
boolean closure of schemas.
 
> There are many more things that must be done with formally defined XML languages
> than validation; Relax NG as it currently specified and implemented, does not
> make those other things easier. 

Relaxer, RelaxNGCC, and XDuce are completely different technologies.  I can also 
imagine some other data binding technologies or programming languages for RELAX NG.
If we incorporate mechanisms that are convenient for one particular style of data 
binding, we run the risk of blocking other styles.

Cheers,

-- 
MURATA Makoto (FAMILY Given) <EB2M-MRT@asahi-net.or.jp>



From vdv@dyomedea.com Mon Oct  6 21:53:27 2003
Received: from dell (evlist.net1.nerim.net [213.41.149.10])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h96ErQVj034894
	for <relaxng-user@relaxng.org>; Mon, 6 Oct 2003 21:53:27 +0700 (ICT)
Received: from dyomedea.com (unknown [10.0.1.21])
	by dell (Postfix) with ESMTP id 016C923787
	for <relaxng-user@relaxng.org>; Mon,  6 Oct 2003 16:53:16 +0200 (CEST)
Message-ID: <3F8181DC.2010106@dyomedea.com>
Date: Mon, 06 Oct 2003 16:53:16 +0200
From: Eric van der Vlist <vdv@dyomedea.com>
Organization: Dyomedea (http://dyomedea.com)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.4) Gecko/20030930 Debian/1.4-5
X-Accept-Language: en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [relaxng-user] Ann: New version of my book "RELAX NG"
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 06 Oct 2003 14:53:28 -0000

I am happy to announce a new version of my book "RELAX NG" to be
published in December by O'Reilly.

This version is available at the usual URL [1]:

It is now pre-production quality and should be close to the final
version which will be available in print [2] and on line both
commercially through Safari [3] and on my site [1] (and maybe others)
under a GFDL [4] licence.

Although the book shouldn't be drastically updated at this point, you
are still welcome to submit your feedback using our annotation system.

Compared to the version which was previously on line, this new one has
gone through a complete copy editing and should be, thanks to Simon
St.Laurent and Tracey Cranston, in much better (American) English and
much easier to read.

The layout of the pages is now generated from DocBook using an
adaptation of the LDP customisation of Norm Walsh's XSL stylesheets.

This results in a bunch of small pages in a format now familiar to many
users and programmers and this should also improve the readability of
the web version.

I hope you'll enjoy reading it as much as I have enjoyed writing it!

Eric

[1] http://books.xmlschemata.org/relaxng/
[2] http://www.amazon.com/exec/obidos/tg/detail/-/0596004214/
[3] http://safari.oreilly.com/
[4] http://www.gnu.org/copyleft/fdl.html
[5]
http://annotations.xmlschemata.org/nph-med.cgi/http://books.xmlschemata.org/relaxng/
-- 
Tired to type XML tags?
                                                         http://wikiml.org
Upcoming schema tutorial:
   - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
   - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------



From jricker@izarinc.com Fri Oct  3 19:32:43 2003
Received: from smtp-1.njaccess.com (smtp-1.njaccess.com [207.113.27.245])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h93CWgHx071882
	for <relaxng-user@relaxng.org>; Fri, 3 Oct 2003 19:32:43 +0700 (ICT)
Received: from njaccess.com (mail.njaccess.com [207.113.27.2])
	by smtp-1.njaccess.com (NJAccess Postfix SMTP Server) with ESMTP id
	E70248DDE
	for <relaxng-user@relaxng.org>; Fri,  3 Oct 2003 08:37:14 -0400 (EDT)
Received: from [192.168.2.127] [64.8.226.4] by njaccess.com with ESMTP
	(SMTPD32-6.06) id AFC19B20104; Fri, 03 Oct 2003 08:46:57 -0400
From: Jeffrey Ricker <jricker@izarinc.com>
To: relaxng-user@relaxng.org
Content-Type: text/plain
Organization: 
Message-Id: <1065183916.4631.6.camel@estonia.izartech.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) 
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 07 Oct 2003 08:09:18 +0700
Subject: [relaxng-user] must externalRef point to a grammar?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 03 Oct 2003 12:32:44 -0000
X-Original-Date: 03 Oct 2003 08:25:17 -0400
X-List-Received-Date: Fri, 03 Oct 2003 12:32:44 -0000

I'm sorry if I missed this in the documentation. I notice in the spec
that <include> must point to a file that has a <grammar> element as
root. Is the same true for <externalRef> or can I have that file be a
simple <element> declaration as its root? 


From cowan@mercury.ccil.org Tue Oct  7 08:12:21 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.9p1/8.11.2) with ESMTP id h971CKlF037672
	for <relaxng-user@relaxng.org>; Tue, 7 Oct 2003 08:12:21 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1A6gOe-0001gE-00; Mon, 06 Oct 2003 21:12:16 -0400
Date: Mon, 6 Oct 2003 21:12:16 -0400
To: Jeffrey Ricker <jricker@izarinc.com>
Subject: Re: [relaxng-user] must externalRef point to a grammar?
Message-ID: <20031007011216.GD19140@mercury.ccil.org>
References: <1065183916.4631.6.camel@estonia.izartech.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1065183916.4631.6.camel@estonia.izartech.com>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 07 Oct 2003 01:12:21 -0000

Jeffrey Ricker scripsit:

> I'm sorry if I missed this in the documentation. I notice in the spec
> that <include> must point to a file that has a <grammar> element as
> root. Is the same true for <externalRef> or can I have that file be a
> simple <element> declaration as its root? 

Sure.  externalRef can point at any pattern whatsoever.
It's just a straight inclusion.

-- 
John Cowan  www.ccil.org/~cowan  jcowan@reutershealth.com  www.reutershealth.com
Monday we watch-a Firefly's house, but he no come out.  He wasn't home.
Tuesday we go to the ball game, but he fool us.  He no show up.  Wednesday he
go to the ball game, and we fool him.  We no show up.  Thursday was a
double-header.  Nobody show up.  Friday it rained all day.  There was no ball
game, so we stayed home and we listened to it on-a the radio.  --Chicolini

From ts@ts-cyberia.net Thu Oct 23 19:27:42 2003
Received: from thebe.your-site.com (thebe.your-site.com [140.186.45.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NCRgcS068907
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 19:27:42 +0700 (ICT)
Received: from ts-cyberia.net (eaoska096105.adsl.ppp.infoweb.ne.jp
	[218.226.11.105])
	by thebe.your-site.com (Postfix) with ESMTP id 21C1E244EC3
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 08:28:12 -0400 (EDT)
Message-ID: <3F97C936.3010009@ts-cyberia.net>
Date: Thu, 23 Oct 2003 21:27:34 +0900
From: Tsuguya Sasaki <ts@ts-cyberia.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en, he, ja
MIME-Version: 1.0
To: RELAXNG-USER <relaxng-user@relaxng.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Subject: [relaxng-user] association of RELAX NG with a document
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 12:27:43 -0000

I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
understand that there is no standard way to associate a RELAX NG schema
with a document. I'm just wondering if there is any plan to make this
possible.

Tsuguya Sasaki, PhD
http://www.ts-cyberia.net/
http://www.jewish-languages.org/



From cowan@mercury.ccil.org Thu Oct 23 19:43:14 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NChDC5070856
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 19:43:14 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1ACenz-0003gc-00; Thu, 23 Oct 2003 08:43:07 -0400
Date: Thu, 23 Oct 2003 08:43:07 -0400
To: Tsuguya Sasaki <ts@ts-cyberia.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Message-ID: <20031023124307.GI19975@mercury.ccil.org>
References: <3F97C936.3010009@ts-cyberia.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <3F97C936.3010009@ts-cyberia.net>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 12:43:14 -0000

Tsuguya Sasaki scripsit:
> I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
> understand that there is no standard way to associate a RELAX NG schema
> with a document. I'm just wondering if there is any plan to make this
> possible.

Not really.  The theory is that you might want to validate a document
against different schemas for different purposes, and no one schema is
really preferred.

-- 
Income tax, if I may be pardoned for saying so,         John Cowan
is a tax on income.  --Lord Macnaghten (1901)           jcowan@reutershealth.com

From robin.berjon@expway.fr Thu Oct 23 19:51:48 2003
Received: from mwinf0401.wanadoo.fr (smtp4.wanadoo.fr [193.252.22.27])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NCpmvI071992
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 19:51:48 +0700 (ICT)
Received: from expway.fr (APastourelles-107-2-4-214.w193-252.abo.wanadoo.fr
	[193.252.9.214]) by mwinf0401.wanadoo.fr (SMTP Server) with ESMTP
	id 7A7C4580011D; Thu, 23 Oct 2003 14:51:42 +0200 (CEST)
Message-ID: <3F97CE63.3070906@expway.fr>
Date: Thu, 23 Oct 2003 14:49:39 +0200
From: Robin Berjon <robin.berjon@expway.fr>
Organization: Expway
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en-gb, en, fr
MIME-Version: 1.0
To: John Cowan <cowan@mercury.ccil.org>
Subject: Re: [relaxng-user] association of RELAX NG with a document
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
In-Reply-To: <20031023124307.GI19975@mercury.ccil.org>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 12:51:49 -0000

John Cowan wrote:
> Tsuguya Sasaki scripsit:
>>I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
>>understand that there is no standard way to associate a RELAX NG schema
>>with a document. I'm just wondering if there is any plan to make this
>>possible.
> 
> Not really.  The theory is that you might want to validate a document
> against different schemas for different purposes, and no one schema is
> really preferred.

That's very true, but at the same time, while I'm not at all a big fan of 
xsi:schemaLocation, DOCTYPE, or other related things such as xml-stylesheet, 
there are cases in which one just needs a simple and lightweight way of 
associating a schema with an instance. And RDDL might be a bit too indirect.

So why not a simple way for simple cases, and let complex cases be dealt in 
other ways? Note that a mechanism comparable to xml-stylesheet could cover the 
case you describe.

-- 
Robin Berjon <robin.berjon@expway.fr>
Research Scientist, Expway      http://expway.com/
7FC0 6F5F D864 EFB8 08CE  8E74 58E6 D5DB 4889 2488


From ts@ts-cyberia.net Thu Oct 23 19:55:36 2003
Received: from thebe.your-site.com (thebe.your-site.com [140.186.45.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NCtZH3072567
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 19:55:35 +0700 (ICT)
Received: from ts-cyberia.net (eaoska096105.adsl.ppp.infoweb.ne.jp
	[218.226.11.105])
	by thebe.your-site.com (Postfix) with ESMTP id DCFB8245850
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 08:56:04 -0400 (EDT)
Message-ID: <3F97CFBF.8090702@ts-cyberia.net>
Date: Thu, 23 Oct 2003 21:55:27 +0900
From: Tsuguya Sasaki <ts@ts-cyberia.net>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5) Gecko/20031007
X-Accept-Language: en, he, ja
MIME-Version: 1.0
To: RELAXNG-USER <relaxng-user@relaxng.org>
Subject: Re: [relaxng-user] association of RELAX NG with a document
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
In-Reply-To: <20031023124307.GI19975@mercury.ccil.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 12:55:37 -0000

John Cowan wrote:

>> I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
>> understand that there is no standard way to associate a RELAX NG schema
>> with a document. I'm just wondering if there is any plan to make this
>> possible.
> 
> Not really.  The theory is that you might want to validate a document
> against different schemas for different purposes, and no one schema is
> really preferred.

Thank you very much for your prompt reply. I'm familiar with this
"theory", but practically speaking, you may nevertheless want to
associate RELAX NG with instance documents for, e.g., guided editing
with an XML editor; there seem to be other circumstances where the
existence of a mechanism for such an association is useful.

Tsuguya Sasaki

PS: I'm a linguist, so I apologize in advance for some (or all) of my
remarks that may not be to the point at all.



From veillard@redhat.com Thu Oct 23 20:43:30 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NDhUGN079925
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 20:43:30 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h9NDhSq12743;
	Thu, 23 Oct 2003 09:43:28 -0400
Date: Thu, 23 Oct 2003 09:43:27 -0400
From: Daniel Veillard <veillard@redhat.com>
To: Tsuguya Sasaki <ts@ts-cyberia.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Message-ID: <20031023094327.O4507@redhat.com>
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
	<3F97CFBF.8090702@ts-cyberia.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <3F97CFBF.8090702@ts-cyberia.net>;
	from ts@ts-cyberia.net on Thu, Oct 23, 2003 at 09:55:27PM +0900
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 13:43:32 -0000

On Thu, Oct 23, 2003 at 09:55:27PM +0900, Tsuguya Sasaki wrote:
> John Cowan wrote:
> 
> >> I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
> >> understand that there is no standard way to associate a RELAX NG schema
> >> with a document. I'm just wondering if there is any plan to make this
> >> possible.
> > 
> > Not really.  The theory is that you might want to validate a document
> > against different schemas for different purposes, and no one schema is
> > really preferred.
> 
> Thank you very much for your prompt reply. I'm familiar with this
> "theory", but practically speaking, you may nevertheless want to
> associate RELAX NG with instance documents for, e.g., guided editing
> with an XML editor; there seem to be other circumstances where the
> existence of a mechanism for such an association is useful.

  I have got the following Request For Enhancement 
    http://bugzilla.gnome.org/show_bug.cgi?id=125266
the idea growing up seems to have the association done at the toolkit
level instead of having it into the instance.
IMHO it's quite cleaner, the author can't really know what are the 
acceptance rule a given instance will go though, but on the other hand
at a tool level automating the association between the instance and the
schemas simplifies things a lot with the associated results (relibility,
cost of maintainance, etc ...)

 Ideally having a predefined (standardized) vocabulary to match the
instances to Schemas (or processing rules but this is yet another can
of worms) would be the best way to attack this problem. It's unclear
to me whether the approach taken by nXML can really be expanded to other
frameworks, I need to read and digest the proposal first,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From iinmgc00@ucv.udc.es Thu Oct 23 21:05:32 2003
Received: from unica.udc.es (unica.udc.es [193.147.41.3])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NE5VB4083864
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 21:05:32 +0700 (ICT)
Received: from unica.udc.es (localhost [127.0.0.1])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id h9NGt2hS002688
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 15:55:02 -0100 (GMT)
Received: from necora.cdf.udc.es (necora.eps.cdf.udc.es [193.147.41.4])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id h9NGt2PQ002685
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 15:55:02 -0100 (GMT)
Received: from eps213 (eps213.eps.cdf.udc.es [193.144.52.213])
	by necora.cdf.udc.es (8.12.8p1/8.11.3) with SMTP id h9NH0gIW012464
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 16:00:43 -0100 (GMT)
Message-ID: <00b701c3996e$d48368e0$d53490c1@eps.cdf.udc.es>
From: =?iso-8859-1?Q?Manuel_Gonz=E1lez_Castro?= <iinmgc00@ucv.udc.es>
To: <relaxng-user@relaxng.org>
Date: Thu, 23 Oct 2003 16:06:13 +0200
Organization: UDC
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_00B2_01C3997F.94ED93C0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Subject: [relaxng-user] Trang problems with interleave
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 14:05:33 -0000


This is a multi-part message in MIME format.

------=_NextPart_000_00B2_01C3997F.94ED93C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I haven't found any Trang mailing list so decided to I post my problem =
here.

I'm using Trang (version 20030619) to translate my Relax NG schemas to =
XML
Schemas. I've found that <interleave> element translation works fine if =
the
patterns inside are elements, but fails if the patterns use definitions. =
=20

This is an example:

--------------------- input file: test.rnc ------------------------

start =3D element dummy { empty }

# Trang works OK
interleave_without_definitions =3D
  element test {
    element e1 { empty }
    & element e2 { empty }?
  }

# Trang fails
def1 =3D element e1 { empty }
def2 =3D element e2 { empty }
interleave_with_definitions =3D
 element test { def1  & def2 ? }

--------------------- output file: test.xsd ------------------------

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"
  elementFormDefault=3D"qualified"> <xs:element name=3D"dummy">
    <xs:complexType/>
  </xs:element>
  <!-- Trang works OK -->
  <xs:group name=3D"interleave_without_definitions">
    <xs:sequence>
      <xs:element name=3D"test">
        <xs:complexType>
          <xs:all>
            <xs:element ref=3D"e1"/>
            <xs:element minOccurs=3D"0" ref=3D"e2"/>
          </xs:all>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:element name=3D"e1">
    <xs:complexType/>
  </xs:element>
  <xs:element name=3D"e2">
    <xs:complexType/>
  </xs:element>
  <!-- Trang fails -->
  <xs:group name=3D"interleave_with_definitions">
    <xs:sequence>
      <xs:element name=3D"test">
        <xs:complexType>
          <xs:choice minOccurs=3D"0" maxOccurs=3D"unbounded">
            <xs:element ref=3D"e1"/>
            <xs:element ref=3D"e2"/>
          </xs:choice>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:group>
</xs:schema>

As you can see, "interleave_without_definitions" uses xs:all (fine) but
"interleave_with_definitions" uses "xs:choice" (wrong).=20

I need definitions in my schema.
Is there any workarround to this problem ?

Thanks in advance,
Manuel

------=_NextPart_000_00B2_01C3997F.94ED93C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#d4d0c8>
<DIV><SPAN class=3Dq0>Hello,<BR><BR>I haven't found any Trang mailing =
list so=20
decided to I post my problem here.<BR><BR>I'm using Trang (version =
20030619) to=20
translate my Relax NG schemas to XML<BR>Schemas. I've found that=20
&lt;interleave&gt; element translation works fine if the<BR>patterns =
inside are=20
elements, but fails if the patterns use definitions. &nbsp;<BR><BR>This =
is an=20
example:<BR><BR>--------------------- input file: test.rnc=20
------------------------<BR><BR>start =3D element dummy { empty =
}<BR><BR># Trang=20
works OK<BR>interleave_without_definitions =3D<BR>&nbsp; element test =
{<BR>&nbsp;=20
&nbsp; element e1 { empty }<BR>&nbsp; &nbsp; &amp; element e2 { empty=20
}?<BR>&nbsp; }<BR><BR># Trang fails<BR>def1 =3D element e1 { empty =
}<BR>def2 =3D=20
element e2 { empty }<BR>interleave_with_definitions =3D<BR>&nbsp;element =
test {=20
def1 &nbsp;&amp; def2 ? }<BR><BR>--------------------- output file: =
test.xsd=20
------------------------<BR><BR>&lt;?xml version=3D"1.0"=20
encoding=3D"UTF-8"?&gt;<BR>&lt;xs:schema xmlns:xs=3D"<A class=3D0=20
href=3D"http://www.w3.org/2001/XMLSchema"><FONT=20
color=3D#000000>http://www.w3.org/2001/XMLSchema</FONT></A>"<BR>&nbsp;=20
elementFormDefault=3D"qualified"&gt; &lt;xs:element =
name=3D"dummy"&gt;<BR>&nbsp;=20
&nbsp; &lt;xs:complexType/&gt;<BR>&nbsp; &lt;/xs:element&gt;<BR>&nbsp; =
&lt;!--=20
Trang works OK --&gt;<BR>&nbsp; &lt;xs:group=20
name=3D"interleave_without_definitions"&gt;<BR>&nbsp; &nbsp;=20
&lt;xs:sequence&gt;<BR>&nbsp; &nbsp; &nbsp; &lt;xs:element=20
name=3D"test"&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; =
&lt;xs:complexType&gt;<BR>&nbsp;=20
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xs:all&gt;<BR>&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp;=20
&nbsp; &lt;xs:element ref=3D"e1"/&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp;=20
&lt;xs:element minOccurs=3D"0" ref=3D"e2"/&gt;<BR>&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp;=20
&lt;/xs:all&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; =
&lt;/xs:complexType&gt;<BR>&nbsp;=20
&nbsp; &nbsp; &lt;/xs:element&gt;<BR>&nbsp; &nbsp;=20
&lt;/xs:sequence&gt;<BR>&nbsp; &lt;/xs:group&gt;<BR>&nbsp; =
&lt;xs:element=20
name=3D"e1"&gt;<BR>&nbsp; &nbsp; &lt;xs:complexType/&gt;<BR>&nbsp;=20
&lt;/xs:element&gt;<BR>&nbsp; &lt;xs:element name=3D"e2"&gt;<BR>&nbsp; =
&nbsp;=20
&lt;xs:complexType/&gt;<BR>&nbsp; &lt;/xs:element&gt;<BR>&nbsp; &lt;!-- =
Trang=20
fails --&gt;<BR>&nbsp; &lt;xs:group=20
name=3D"interleave_with_definitions"&gt;<BR>&nbsp; &nbsp;=20
&lt;xs:sequence&gt;<BR>&nbsp; &nbsp; &nbsp; &lt;xs:element=20
name=3D"test"&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; =
&lt;xs:complexType&gt;<BR>&nbsp;=20
&nbsp; &nbsp; &nbsp; &nbsp; &lt;xs:choice minOccurs=3D"0"=20
maxOccurs=3D"unbounded"&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =

&lt;xs:element ref=3D"e1"/&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;=20
&lt;xs:element ref=3D"e2"/&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=20
&lt;/xs:choice&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp;=20
&lt;/xs:complexType&gt;<BR>&nbsp; &nbsp; &nbsp; =
&lt;/xs:element&gt;<BR>&nbsp;=20
&nbsp; &lt;/xs:sequence&gt;<BR>&nbsp;=20
&lt;/xs:group&gt;<BR>&lt;/xs:schema&gt;<BR><BR>As you can see,=20
"interleave_without_definitions" uses xs:all (fine)=20
but<BR>"interleave_with_definitions" uses "xs:choice" (wrong).=20
<BR><BR>I&nbsp;need definitions in my schema.<BR>Is there any =
workarround to=20
this problem ?<BR><BR>Thanks in=20
advance,<BR>Manuel<BR></SPAN></DIV></BODY></HTML>

------=_NextPart_000_00B2_01C3997F.94ED93C0--



From dvd@davidashen.net Thu Oct 23 21:43:06 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NEh2vl090107
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 21:43:05 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9NEeEgv062430
	for <relaxng-user@relaxng.org>; Thu, 23 Oct 2003 19:40:14 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9NEeE4q062429
	for relaxng-user@relaxng.org; Thu, 23 Oct 2003 19:40:14 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310231440.h9NEeE4q062429@adat.davidashen.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
In-Reply-To: <20031023124307.GI19975@mercury.ccil.org>
To: relaxng-user@relaxng.org
Date: Thu, 23 Oct 2003 19:40:14 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 14:43:07 -0000

> Tsuguya Sasaki scripsit:
> > I'm a relatively new "convert" (from XML Schema) to RELAX NG. I
> > understand that there is no standard way to associate a RELAX NG schema
> > with a document. I'm just wondering if there is any plan to make this
> > possible.
> 
> Not really.  The theory is that you might want to validate a document
> against different schemas for different purposes, and no one schema is
> really preferred.
> 

Sounds like a mantra. In simpler words, the people who designed the
technology don't see a consistent way to formally express an
association that already exists, or didn't implement it yet. If I
pretend that a document is valid against a RNG schema, how would I
formally express it in a standard way? Is there something more platform independent and XML-ish
than

#!/bin/sh
java -jar jing.jar schema.rng document.xml

?

David Tolpin
http://davidashen.net/



From jcowan@reutershealth.com Fri Oct 24 00:56:21 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9NHuL8U023264
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 00:56:21 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id NAA04706; 
	Thu, 23 Oct 2003 13:47:34 -0400 (EDT)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Thu, 23 Oct 2003 13:51:22 -0400
Date: Thu, 23 Oct 2003 13:51:22 -0400
From: John Cowan <jcowan@reutershealth.com>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Message-ID: <20031023175122.GE24090@skunk.reutershealth.com>
References: <20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200310231440.h9NEeE4q062429@adat.davidashen.net>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Oct 2003 17:56:21 -0000

David Tolpin scripsit:

> In simpler words, the people who designed the
> technology don't see a consistent way to formally express an
> association that already exists, or didn't implement it yet. 

It's part of the general problem of specifying appropriate XML
processing; an RNG-specific solution is neither particularly
general nor, IMHO, particularly useful.

> If I
> pretend that a document is valid against a RNG schema, how would I
> formally express it in a standard way? 

How about this:

<?xml version="1.0"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:rngspec="http://www.relaxng.org/spec-20011203.html#/">
  <rdf:Description about="http://davidashen.net/document.xml">
    <rngspec:validity rdf:resource="http://www.davidashen.net/schema.rng"/>
  </rdf:Description>
</rdf:RDF>

-- 
John Cowan  jcowan@reutershealth.com  www.reutershealth.com  www.ccil.org/~cowan
I come from under the hill, and under the hills and over the hills my paths
led. And through the air. I am he that walks unseen.  I am the clue-finder,
the web-cutter, the stinging fly. I was chosen for the lucky number.  --Bilbo

From jjc@jclark.com Fri Oct 24 08:34:55 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O1YrGl087110
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 08:34:54 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9O1YRY18177; Fri, 24 Oct 2003 08:34:27 +0700
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: Daniel Veillard <veillard@redhat.com>
In-Reply-To: <20031023094327.O4507@redhat.com>
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
	<3F97CFBF.8090702@ts-cyberia.net> <20031023094327.O4507@redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1066959011.21207.242.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 01:35:01 -0000
X-Original-Date: 24 Oct 2003 08:31:09 +0700
X-List-Received-Date: Fri, 24 Oct 2003 01:35:01 -0000

On Thu, 2003-10-23 at 20:43, Daniel Veillard wrote:

> the idea growing up seems to have the association done at the toolkit
> level instead of having it into the instance.

Right. I believe it's quite wrong for a schema language to dictate that
a document type designer must use an element name or an attribute for a
particular purpose (as W3C XML Schema does with xsi:type or
xsi:schemaLocation). The document type designer should be the one who
decides what element names and attribute names to use, and the schema
language should allow the document type designer to write a schema to
reflect their decision.  I think this extends to any association
mechanism and it also applies to processing instruction target names.

This does not prevent your having something in the instance that
influences the association but it does imply that the ultimate authority
must be outside the instance.  If, for example, you want a processing
instruction in the instance to point to the schema, then there must be
something outside the instance that says that this is what you want and
that specifies the processing instruction target to use for this
purpose.

Once you decide that you want something outside the instance to control
the association, I think it's an obvious decision to express that
something in XML and it's highly desirable to make it
application-independent. 

> It's unclear
> to me whether the approach taken by nXML can really be expanded to other
> frameworks

If it can't, then it's a bug.  It was a fundamental design goal to
express the association rules in an application-independent way.
Eventually, I hope to implement this for Jing as well.

James
 



From jjc@jclark.com Fri Oct 24 08:54:39 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O1sbLN089680
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 08:54:38 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9O1oKY18276; Fri, 24 Oct 2003 08:50:20 +0700
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: John Cowan <jcowan@reutershealth.com>
In-Reply-To: <20031023175122.GE24090@skunk.reutershealth.com>
References: <20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
	<20031023175122.GE24090@skunk.reutershealth.com>
Content-Type: text/plain
Organization: 
Message-Id: <1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 01:54:40 -0000
X-Original-Date: 24 Oct 2003 08:47:04 +0700
X-List-Received-Date: Fri, 24 Oct 2003 01:54:40 -0000

On Fri, 2003-10-24 at 00:51, John Cowan wrote:
> David Tolpin scripsit:
> 
> > In simpler words, the people who designed the
> > technology don't see a consistent way to formally express an
> > association that already exists, or didn't implement it yet. 
> 
> It's part of the general problem of specifying appropriate XML
> processing; an RNG-specific solution is neither particularly
> general nor, IMHO, particularly useful.

I would divide the problem of specifying appropriate XML processing for
a document into:

(a) how to specify the process to be performed

(b) how to locate the appropriate processing specification

I see (b) as a special case of the problem of how to specify rules that,
given an XML document, find a related resource.  This is problem that
the XML vocabulary that I've designed for nXML mode is intended to
solve.  It's not specific to RELAX NG or for that matter to schemas. 
You could use the same vocabulary to describe how to find the XSLT
stylesheet to use to display an XML document.

> > If I
> > pretend that a document is valid against a RNG schema, how would I
> > formally express it in a standard way? 
> 
> How about this:
> 
> <?xml version="1.0"?>
> <rdf:RDF
>   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
>   xmlns:rngspec="http://www.relaxng.org/spec-20011203.html#/">
>   <rdf:Description about="http://davidashen.net/document.xml">
>     <rngspec:validity rdf:resource="http://www.davidashen.net/schema.rng"/>
>   </rdf:Description>
> </rdf:RDF>

Although it's important to be able to individually specify the schema to
use for a particular document, it's also convenient to be able to
specify rules that apply to classes of document.  For example, on my
system I have a rule that says when the namespace URI of the document
element is http://relaxng.org/ns/structure/1.0, then the schema is
/home/jjc/schema/relaxng.rnc.

James


From dvd@davidashen.net Fri Oct 24 13:10:01 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O69wEN021207
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 13:10:00 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9O67Fgv068329
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 11:07:15 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9O67ENu068328
	for relaxng-user@relaxng.org; Fri, 24 Oct 2003 11:07:14 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310240607.h9O67ENu068328@adat.davidashen.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
In-Reply-To: <1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Fri, 24 Oct 2003 11:07:14 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 06:10:05 -0000

> On Fri, 2003-10-24 at 00:51, John Cowan wrote:
> > David Tolpin scripsit:
> > 
> > > In simpler words, the people who designed the
> > > technology don't see a consistent way to formally express an
> > > association that already exists, or didn't implement it yet. 
> > 
> > It's part of the general problem of specifying appropriate XML
> > processing; an RNG-specific solution is neither particularly
> > general nor, IMHO, particularly useful.
> 
> I would divide the problem of specifying appropriate XML processing for
> a document into:
> 
> (a) how to specify the process to be performed
> 
> (b) how to locate the appropriate processing specification
> 
> I see (b) as a special case of the problem of how to specify rules that,
> given an XML document, find a related resource.  This is problem that
> the XML vocabulary that I've designed for nXML mode is intended to
> solve.  It's not specific to RELAX NG or for that matter to schemas. 
> You could use the same vocabulary to describe how to find the XSLT
> stylesheet to use to display an XML document.

The approach designed for nXML is good. However, it has traps.

I agree that the approach can be convenietly used to assist the user 
in choosing the right associations (a schema, a stylesheet, etc). But after
the association is chosen, it should be somehow attached to the document,
at least, in some cases.

It is my decision that document X uses schema Y for validation. Once I made
this decision, all later processing should be based on that, and any change
in association should be expressed explicitly. 

  With the approach described, changes in the map can cause changes in associations;
  and it can come completely unexpected to the user. Consider a system where the map
  is a system-wide resource.

Providing a rule in the file that associates the document's URI with a resource does not
help either. The association should persist if I change the name of the document. 

  The fact that I renamed my document from users-guide.dbx to user-guide.dbx should not
  lead to any change in the associations to schemas and stylesheets. It is a property
  of the document as an entity to be valid against a schema and processable by a stylesheet,
  nor of its file name, or its root element, or its root element's namespace. If I misspell
  the root element or the namespace, I want an error message saying that the name or namespace
  are misspelled, not that the documented is invalid with respect to a schema selected according
  to a misspelled URL.

Thus, for me the only reasonable choice  is still to use the DOCTYPE declaration for all
associations and only rely on other characteristics for interactive hints (a list of DOCTYPEs
that should be good for this document).

David Tolpin
http://davidashen.net/


From jjc@jclark.com Fri Oct 24 14:07:35 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O77V4A027744
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 14:07:34 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9O745Y19921; Fri, 24 Oct 2003 14:04:05 +0700
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200310240607.h9O67ENu068328@adat.davidashen.net>
References: <200310240607.h9O67ENu068328@adat.davidashen.net>
Content-Type: text/plain
Organization: 
Message-Id: <1066978846.21207.279.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 07:07:35 -0000
X-Original-Date: 24 Oct 2003 14:00:46 +0700
X-List-Received-Date: Fri, 24 Oct 2003 07:07:35 -0000

On Fri, 2003-10-24 at 13:07, David Tolpin wrote:

> I agree that the approach can be convenietly used to assist the user 
> in choosing the right associations (a schema, a stylesheet, etc). But after
> the association is chosen, it should be somehow attached to the document,
> at least, in some cases.
> 
> It is my decision that document X uses schema Y for validation. Once I made
> this decision, all later processing should be based on that, and any change
> in association should be expressed explicitly. 

That's one policy that you might want, but I don't think it's the only
one.  You can get it by explicitly adding a <uri resource="..." ...>
element to a schema locating file.

>   With the approach described, changes in the map can cause changes in associations;
>   and it can come completely unexpected to the user. Consider a system where the map
>   is a system-wide resource.

The user can choose whether to use a system-wide map or their own map.
The user might *want* changing the map to cause changes in association.

> Providing a rule in the file that associates the document's URI with a resource does not
> help either.

It's not perfect, but it certainly helps.

>  The association should persist if I change the name of the document. 
> 
>   The fact that I renamed my document from users-guide.dbx to user-guide.dbx should not
>   lead to any change in the associations to schemas and stylesheets.

That is a problem. The real solution is to be able to attach metadata to
the file without changing the content; unfortunately filesystems
typically can't do that.  On the other hand, WebDAV can; you could have
a new rule type that specified a WebDAV property that contains the URI
of the schema for a document.

> Thus, for me the only reasonable choice  is still to use the DOCTYPE declaration for all
> associations 

If you want to use DOCTYPEs, the nXML method can accomodate you (by
doctypePublicId rules). However, I find the problems of using DOCTYPEs
worse by far than the problem of associations disappearing on a rename.
And even with DOCTYPEs, you can still get problem of the association
changing; you still have to associate your DOCTYPEs with schemas.  If
you force me to put something in the instance, I would much prefer a
processing instruction.

There's no single right way to do the association. Different users will
legitimately prefer different approaches. A solution needs to be
flexible enough to accomodate them.

James



From dvd@davidashen.net Fri Oct 24 14:21:29 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O7LPE1029353
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 14:21:27 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9O7Iggv068620
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 12:18:42 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9O7IglK068619
	for relaxng-user@relaxng.org; Fri, 24 Oct 2003 12:18:42 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310240718.h9O7IglK068619@adat.davidashen.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
In-Reply-To: <1066978846.21207.279.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Fri, 24 Oct 2003 12:18:42 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 07:21:29 -0000

> The user might *want* changing the map to cause changes in association.

But this should be done in such a way that all changes in associations for
already associated documents are explicit and obvious. Without that, and with
rules with complex inference, the consequences are not always desirable.

I am talking from experience. At the time of RenderX, we had a client who complained
about a bug in XEP (an XSL FO formatter) being unable to format a document and giving
weird diagnostic messages (and our support people having no idea where this diagnostics
comes from). I asked about their system, and indeed they had a CMS that associated
documents and stylesheets based on complex rules stored in a database, and indeed the
database administrator  has changed the records in such a way that a chain of transformation
had changed.

The result was a user complaining of a tool that failed to format a documents 'when more figures
are added' (which was just a coincidence).

> 
> > Providing a rule in the file that associates the document's URI with a resource does not
> > help either.
> 
> It's not perfect, but it certainly helps.

It certainly helps, I'm sorry for the wording; I meant it didn't help to avoid the trap
just described.

> That is a problem. The real solution is to be able to attach metadata to
> the file without changing the content; unfortunately filesystems
> typically can't do that.  On the other hand, WebDAV can; you could have
> a new rule type that specified a WebDAV property that contains the URI
> of the schema for a document.

Yes. But WebDAV is too much for many cases.

> > Thus, for me the only reasonable choice  is still to use the DOCTYPE declaration for all
> > associations 
> 
> If you want to use DOCTYPEs, the nXML method can accomodate you (by
> doctypePublicId rules). However, I find the problems of using DOCTYPEs
> worse by far than the problem of associations disappearing on a rename.
> And even with DOCTYPEs, you can still get problem of the association
> changing; you still have to associate your DOCTYPEs with schemas.  If
> you force me to put something in the instance, I would much prefer a
> processing instruction.
> 

Well, you are right. I mentioned DOCTYPE but actually wanted something like a processing-instruction
with something like a public identifier as the target.


> There's no single right way to do the association. Different users will
> legitimately prefer different approaches. A solution needs to be
> flexible enough to accomodate them.

But my concern is that that particular flexibility bears problems which are more scalable
than the solution. That is, when the system is getting bigger, the problems outweigh the benefits.
I realize that I can be wrong.

David Tolpin

From george@sync.ro Fri Oct 24 14:27:19 2003
Received: from decebal.sync.ro (decebal.sync.ro [217.156.64.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O7RGHJ029941
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 14:27:18 +0700 (ICT)
Received: from spelling ([10.0.0.19])
	by decebal.sync.ro (8.12.8/8.12.8) with SMTP id h9O7OsPw003508
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 10:24:57 +0300
Message-ID: <009801c39a09$71af6890$1300000a@spelling>
From: "George Cristian Bina" <george@sync.ro>
To: <relaxng-user@relaxng.org>
References: <200310240607.h9O67ENu068328@adat.davidashen.net>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Date: Fri, 24 Oct 2003 10:33:02 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 07:27:20 -0000

Hi,

I think it is important to both have an association with a schema specified
inside the document and the possibility to associate the schema externally.
The external association seems to me user dependent as each user may have
his rules while the internal association is something user independent as
the association comes with the document.
For instance if I want to pass over a document to someone it is a lot
simpler to allow him to validate the document if I have the association
inside the document. We solved the association problem in oXygen using a PI,
however it would be much better to have a PI every application that wants to
support Relax NG should implement, thus users using different tools will be
able to easily exchange documents. I think Relax NG should specify such a
PI. (It will be good if NRL will also specify such a PI).
I see the external association especially important when the user handles
documents that do not or should not have an association inside the document.

Best Regards,
 George
-------------------------------------------------------------
George Cristian Bina mailto:george@sync.ro
<oXygen/> XML Editor - http://www.oxygenxml.com/



From veillard@redhat.com Fri Oct 24 16:29:21 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O9TKqK043994
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 16:29:21 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h9O9TIM22594;
	Fri, 24 Oct 2003 05:29:18 -0400
Date: Fri, 24 Oct 2003 05:29:18 -0400
From: Daniel Veillard <veillard@redhat.com>
To: James Clark <jjc@jclark.com>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Message-ID: <20031024052918.A4507@redhat.com>
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
	<3F97CFBF.8090702@ts-cyberia.net> <20031023094327.O4507@redhat.com>
	<1066959011.21207.242.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <1066959011.21207.242.camel@rambutan.bkk.thaiopensource.com>;
	from jjc@jclark.com on Fri, Oct 24, 2003 at 08:31:09AM +0700
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 09:29:21 -0000

On Fri, Oct 24, 2003 at 08:31:09AM +0700, James Clark wrote:
> Once you decide that you want something outside the instance to control
> the association, I think it's an obvious decision to express that
> something in XML and it's highly desirable to make it
> application-independent. 

  Yes, this really makes sense.

> > It's unclear
> > to me whether the approach taken by nXML can really be expanded to other
> > frameworks
> 
> If it can't, then it's a bug.  It was a fundamental design goal to
> express the association rules in an application-independent way.
> Eventually, I hope to implement this for Jing as well.

  Okay, thanks for the information. I will look at it once I'm done with
the current work, the request in bugzilla will stay there to remind me 
about it,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From veillard@redhat.com Fri Oct 24 16:39:00 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O9d0NQ045045
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 16:39:00 +0700 (ICT)
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.11.6/8.11.0) id h9O9cvt26808;
	Fri, 24 Oct 2003 05:38:57 -0400
Date: Fri, 24 Oct 2003 05:38:57 -0400
From: Daniel Veillard <veillard@redhat.com>
To: James Clark <jjc@jclark.com>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Message-ID: <20031024053857.B4507@redhat.com>
References: <20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
	<20031023175122.GE24090@skunk.reutershealth.com>
	<1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>;
	from jjc@jclark.com on Fri, Oct 24, 2003 at 08:47:04AM +0700
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>,
	John Cowan <jcowan@reutershealth.com>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 09:39:00 -0000

On Fri, Oct 24, 2003 at 08:47:04AM +0700, James Clark wrote:
> Although it's important to be able to individually specify the schema to
> use for a particular document, it's also convenient to be able to
> specify rules that apply to classes of document.  For example, on my
> system I have a rule that says when the namespace URI of the document
> element is http://relaxng.org/ns/structure/1.0, then the schema is
> /home/jjc/schema/relaxng.rnc.

  Hum, that's a place where I would expect the XML Catalogs to take
a role in abstracting the file paths. I would still recommend to
use a canonical URL (is there one for relaxng.rnc one http://relaxng.org ?)
and have the catalogs remap to the actual file location. This was
really important as we deployed DocBook processing tools on the various
Linux distributions (and Solaris), I would like to be able to do the
same as I'm starting to push Relax-NG schemas (DocBook, XHTML1, SVG
are good candidate, as well as the RNG for RNG schema).
  It's less critical than when the reference ends up in the instance,
but would still helps a lot for system setup, tools setup and documentation.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From vdv@dyomedea.com Fri Oct 24 16:49:42 2003
Received: from dell (evlist.net1.nerim.net [213.41.149.10])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9O9nb9U046136
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 16:49:41 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.1.21]) by dell (Postfix) with ESMTP
	id D121023779; Fri, 24 Oct 2003 11:49:33 +0200 (CEST)
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: Eric van der Vlist <vdv@dyomedea.com>
To: James Clark <jjc@jclark.com>
In-Reply-To: <1066959011.21207.242.camel@rambutan.bkk.thaiopensource.com>
References: <3F97C936.3010009@ts-cyberia.net>
	<20031023124307.GI19975@mercury.ccil.org>
	<3F97CFBF.8090702@ts-cyberia.net> <20031023094327.O4507@redhat.com>
	<1066959011.21207.242.camel@rambutan.bkk.thaiopensource.com>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1066988977.1402.2.camel@porteric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Fri, 24 Oct 2003 11:49:37 +0200
Content-Transfer-Encoding: 7bit
Cc: RELAXNG-USER <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 09:49:42 -0000

Hi James,

On Fri, 2003-10-24 at 03:31, James Clark wrote:

> Right. I believe it's quite wrong for a schema language to dictate that
> a document type designer must use an element name or an attribute for a
> particular purpose (as W3C XML Schema does with xsi:type or
> xsi:schemaLocation). The document type designer should be the one who
> decides what element names and attribute names to use, and the schema
> language should allow the document type designer to write a schema to
> reflect their decision.  I think this extends to any association
> mechanism and it also applies to processing instruction target names.

Do you think this should be added to the requirements of DSDL - Part 10
(Validation Management) ?

Eric

-- 
Read me on XML.com.
                                            http://www.xml.com/pub/au/74
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From jjc@jclark.com Fri Oct 24 19:28:05 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9OCS2TM064282
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 19:28:04 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9OCRXY21572; Fri, 24 Oct 2003 19:27:33 +0700
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: George Cristian Bina <george@sync.ro>
In-Reply-To: <009801c39a09$71af6890$1300000a@spelling>
References: <200310240607.h9O67ENu068328@adat.davidashen.net>
	<009801c39a09$71af6890$1300000a@spelling>
Content-Type: text/plain
Organization: 
Message-Id: <1066998256.21207.284.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 12:28:05 -0000
X-Original-Date: 24 Oct 2003 19:24:16 +0700
X-List-Received-Date: Fri, 24 Oct 2003 12:28:05 -0000

On Fri, 2003-10-24 at 15:33, George Cristian Bina wrote:

> We solved the association problem in oXygen using a PI

What does your PI look like exactly?

James



From george@sync.ro Fri Oct 24 20:17:13 2003
Received: from decebal.sync.ro (decebal.sync.ro [217.156.64.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9ODHBri072048
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 20:17:12 +0700 (ICT)
Received: from spelling ([10.0.0.19])
	by decebal.sync.ro (8.12.8/8.12.8) with SMTP id h9ODEjPw011018;
	Fri, 24 Oct 2003 16:14:46 +0300
Message-ID: <029f01c39a3a$523f0bb0$1300000a@spelling>
From: "George Cristian Bina" <george@sync.ro>
To: "James Clark" <jjc@jclark.com>
References: <200310240607.h9O67ENu068328@adat.davidashen.net>
	<009801c39a09$71af6890$1300000a@spelling>
	<1066998256.21207.284.camel@rambutan.bkk.thaiopensource.com>
Subject: Re: [relaxng-user] association of RELAX NG with a document
Date: Fri, 24 Oct 2003 16:22:55 +0200
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 13:17:13 -0000

Hi James,

For Relax NG we have something like below:

<?oxygen RNGSchema="test/RelaxNG/compact/test1.rnc" type="compact"?>
<?oxygen RNGSchema="test/RelaxNG/XML/test1.rng" type="xml"?>

For NRL:

<?oxygen NRLSchema="test/RelaxNG/NRL/nrlSchema.nrl"?>

I guess these can be put better into something like:

<?schema location="schemaLocation" type="rnc|rng|nrl"?>

For type we can eventually have as values: text/rnc, text/rng or text/nrl.
For compact schemas we may also need an encoding pseudo attribute.

Best Regards,
 George
-------------------------------------------------------------
George Cristian Bina mailto:george@sync.ro
<oXygen/> XML Editor - http://www.oxygenxml.com/


----- Original Message ----- 
From: "James Clark" <jjc@jclark.com>
To: "George Cristian Bina" <george@sync.ro>
Cc: <relaxng-user@relaxng.org>
Sent: Friday, October 24, 2003 2:24 PM
Subject: Re: [relaxng-user] association of RELAX NG with a document


> On Fri, 2003-10-24 at 15:33, George Cristian Bina wrote:
> 
> > We solved the association problem in oXygen using a PI
> 
> What does your PI look like exactly?
> 
> James
> 
> 


From gtxrg-relaxng-user@gmane.org Sat Oct 25 01:21:02 2003
Received: from main.gmane.org (main.gmane.org [80.91.224.249])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9OIL1BH023685
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 01:21:02 +0700 (ICT)
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1AD6YV-00051L-00
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 20:20:59 +0200
Mail-Followup-To: relaxng-user@relaxng.org
X-Injected-Via-Gmane: http://gmane.org/
To: relaxng-user@relaxng.org
Received: from sea.gmane.org ([80.91.224.252])
	by main.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 1AD6VL-0004yO-00 for <gmane-text-xml-relaxng-general@m.gmane.org>;
	Fri, 24 Oct 2003 20:17:43 +0200
Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1AD6VL-0000g4-00 for <gmane-text-xml-relaxng-general@m.gmane.org>;
	Fri, 24 Oct 2003 20:17:43 +0200
From: Steinar Bang <sb@dod.no>
Date: Fri, 24 Oct 2003 20:17:42 +0200
Organization: Probably a good idea
Lines: 28
Message-ID: <87ismeqz3t.fsf@doohan.bang.priv.no>
References: <20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
	<20031023175122.GE24090@skunk.reutershealth.com>
	<1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>
	<20031024053857.B4507@redhat.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@sea.gmane.org
Mail-Copies-To: never
User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:xgfeDr3JnEiF3XlxGnMoYjZX4/g=
Sender: news <news@sea.gmane.org>
Subject: [relaxng-user] Re: association of RELAX NG with a document
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 18:21:03 -0000

>>>>> Daniel Veillard <veillard@redhat.com>:

> Hum, that's a place where I would expect the XML Catalogs to take a
> role in abstracting the file paths. I would still recommend to use a
> canonical URL (is there one for relaxng.rnc one http://relaxng.org
> ?)  and have the catalogs remap to the actual file location. This
> was really important as we deployed DocBook processing tools on the
> various Linux distributions (and Solaris), I would like to be able
> to do the same as I'm starting to push Relax-NG schemas (DocBook,
> XHTML1, SVG are good candidate, as well as the RNG for RNG schema).
> It's less critical than when the reference ends up in the instance,
> but would still helps a lot for system setup, tools setup and
> documentation.

One way of doing this would be to have a similar approach to what's
done with XML Catalogs on the different linuxen.  Ie. have an
/etc/xml/locator file in addition to the /etc/xml/catalog files, and
have the RPMs, or deb packages, for different schemas, add and remove
entries from this file.

Of course, this would require a tool like your "xmlcatalog" program,
and/or a hierarchical structure like that adopted by the debian
SGML/XML policy
	http://people.debian.org/~mrj/xml-sgml-policy/debian-policy/

(...and it would also require all linux distros to adopt this format,
which sort of overlaps with XML Catalogs, just as they have all
started to use XML Catalogs...)


From gtxrg-relaxng-user@gmane.org Sat Oct 25 01:31:08 2003
Received: from main.gmane.org (main.gmane.org [80.91.224.249])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9OIV7iM025407
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 01:31:08 +0700 (ICT)
Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1AD6iC-0005Ak-00
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 20:31:00 +0200
Mail-Followup-To: relaxng-user@relaxng.org
X-Injected-Via-Gmane: http://gmane.org/
To: relaxng-user@relaxng.org
Received: from sea.gmane.org ([80.91.224.252])
	by main.gmane.org with esmtp (Exim 3.35 #1 (Debian))
	id 1AD6d8-00057l-00 for <gmane-text-xml-relaxng-general@m.gmane.org>;
	Fri, 24 Oct 2003 20:25:46 +0200
Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian))
	id 1AD6d8-0000xO-00 for <gmane-text-xml-relaxng-general@m.gmane.org>;
	Fri, 24 Oct 2003 20:25:46 +0200
From: Steinar Bang <sb@dod.no>
Date: Fri, 24 Oct 2003 20:25:45 +0200
Organization: Probably a good idea
Lines: 25
Message-ID: <8765ieqyqe.fsf@doohan.bang.priv.no>
References: <1066978846.21207.279.camel@rambutan.bkk.thaiopensource.com>
	<200310240718.h9O7IglK068619@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: usenet@sea.gmane.org
Mail-Copies-To: never
User-Agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Common Lisp, linux)
Cancel-Lock: sha1:Y1dnFjq0BIxHkz8y3eli91YF604=
Sender: news <news@sea.gmane.org>
Subject: [relaxng-user] Re: association of RELAX NG with a document
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 18:31:09 -0000

>>>>> David Tolpin <dvd@davidashen.net>:

> Well, you are right. I mentioned DOCTYPE but actually wanted
> something like a processing-instruction with something like a public
> identifier as the target.

>From the nXML Document/schema association proposal:
   ...
   A typeIdProcessingInstruction rule allows a document to specify its
   own typeId with a processing instruction. The target attribute
   specifies the processing instruction target that should be
   recognized as specifying a typeId in its value. For example, with
   an additional rule

    <typeIdProcessingInstruction target="my-doctype"/>

   a document that started 

    <?my-doctype XHTML Transitional?>
   <html xmlns="http://www.w3.org/1999/xhtml">

   would be validated against xhtml-transitional.rnc.

The entire proposal is here:
	http://groups.yahoo.com/group/emacs-nxml-mode/message/259


From dvd@davidashen.net Sat Oct 25 01:43:51 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9OIhlop027686
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 01:43:49 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9OIf0gv073655
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 23:41:00 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9OIf0NS073654
	for relaxng-user@relaxng.org; Fri, 24 Oct 2003 23:41:00 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310241841.h9OIf0NS073654@adat.davidashen.net>
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
In-Reply-To: <8765ieqyqe.fsf@doohan.bang.priv.no>
To: relaxng-user@relaxng.org
Date: Fri, 24 Oct 2003 23:40:59 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 24 Oct 2003 18:43:53 -0000

> >>>>> David Tolpin <dvd@davidashen.net>:
> 
> > Well, you are right. I mentioned DOCTYPE but actually wanted
> > something like a processing-instruction with something like a public
> > identifier as the target.
> 
> >From the nXML Document/schema association proposal:
>    ...
>    A typeIdProcessingInstruction rule allows a document to specify its
>    own typeId with a processing instruction. The target attribute
>    specifies the processing instruction target that should be
>    recognized as specifying a typeId in its value. For example, with
>    an additional rule
> 
>     <typeIdProcessingInstruction target="my-doctype"/>
> 
>    a document that started 
> 
>     <?my-doctype XHTML Transitional?>
>    <html xmlns="http://www.w3.org/1999/xhtml">
> 
>    would be validated against xhtml-transitional.rnc.
> 
> The entire proposal is here:
> 	http://groups.yahoo.com/group/emacs-nxml-mode/message/259

Yes, I had read the proposal before posting. My opinion is that this association should be
obligatory once present and could not be overriden. As specified, it can be overriden
completely unexpectedly for the user.

David Tolpin

From jjc@jclark.com Sat Oct 25 06:12:05 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9ONC25V069373
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 06:12:04 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9ON8YY25380; Sat, 25 Oct 2003 06:08:35 +0700
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200310241841.h9OIf0NS073654@adat.davidashen.net>
References: <200310241841.h9OIf0NS073654@adat.davidashen.net>
Content-Type: text/plain
Organization: 
Message-Id: <1067036716.21207.303.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 23:12:06 -0000
X-Original-Date: 25 Oct 2003 06:05:16 +0700
X-List-Received-Date: Fri, 24 Oct 2003 23:12:06 -0000

On Sat, 2003-10-25 at 01:40, David Tolpin wrote:

> My opinion is that this association should be
> obligatory once present and could not be overriden.

It's a basic tenet of RELAX NG that the schema is not inherent in the
document and that validation is a process that has two
independently-specifiable inputs.  Section 8 of the spec says: "A
conforming RELAX NG validator must be able to determine for any XML
document and for any correct RELAX NG schema whether the document is
valid with respect to the schema."  If I understand you correctly,
you're saying that if the document contains a particular processing
instruction, then there should not be a way to validate it against a
schema other than that specified in the processing instruction.  That's
clearly non-conformant. A conforming RELAX NG validator must allow you
to use any schema to validate a document, no matter what processing
instruction the document contains.

James



From jjc@jclark.com Sat Oct 25 06:20:22 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9ONKJji070298
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 06:20:21 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9ONJSY25417; Sat, 25 Oct 2003 06:19:28 +0700
Subject: Re: [relaxng-user] association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: Daniel Veillard <veillard@redhat.com>
In-Reply-To: <20031024053857.B4507@redhat.com>
References: <20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
	<20031023175122.GE24090@skunk.reutershealth.com>
	<1066960024.21207.258.camel@rambutan.bkk.thaiopensource.com>
	<20031024053857.B4507@redhat.com>
Content-Type: text/plain
Organization: 
Message-Id: <1067037369.21207.314.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>,
	John Cowan <jcowan@reutershealth.com>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Fri, 24 Oct 2003 23:20:22 -0000
X-Original-Date: 25 Oct 2003 06:16:09 +0700
X-List-Received-Date: Fri, 24 Oct 2003 23:20:22 -0000

On Fri, 2003-10-24 at 16:38, Daniel Veillard wrote:

>   Hum, that's a place where I would expect the XML Catalogs to take
> a role in abstracting the file paths.

I think that's an independent issue.  If you are in an environment that
has a policy of using XML catalogs for URI remapping in XML-related
contexts, then it would make sense to use them for remapping both URIs
occuring in include/externalRef in schemas and URIs occurring in
locating files.  However I don't see any need to explicitly couple
locating files to catalogs.  My personal opinion is that, although XML
catalogs are an appropriate solution to the problem of publicId-to-URI
mapping, using XML catalogs to perform URI-to-URI mapping is an
XML-specific solution to a non-XML-specific problem.

James



From catcode@catcode.com Sat Oct 25 07:37:38 2003
Received: from tengu.host4u.net (tengu.host4u.net [209.150.128.42])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9P0bb1R079372
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 07:37:38 +0700 (ICT)
Received: from localhost (catcode@localhost)
	by tengu.host4u.net (8.11.6/8.11.6) with ESMTP id h9P0aTP31146
	for <relaxng-user@relaxng.org>; Fri, 24 Oct 2003 19:36:29 -0500
Date: Fri, 24 Oct 2003 19:36:29 -0500 (CDT)
From: "J. David Eisenberg" <catcode@catcode.com>
X-X-Sender: catcode@tengu.host4u.net
To: relaxng-user@relaxng.org
Message-ID: <Pine.LNX.4.44.0310241925060.29421-100000@tengu.host4u.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Subject: [relaxng-user] Trang handling of (text|element) content
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 25 Oct 2003 00:37:38 -0000

By "popular demand" my XML class wants to know about XML Schema.
One example is a document that consists of one or more lists.
A list consists of one or more items. Each item consists of text
or a list. (Yes, I'm teaching about recursive definitions.)
Sample document follows:

<document>
  <list>
    <item> First item outer </item>
    <item> Second item outer </item>
    <item>
      <list>
          <item> nested first </item>
      </list>
    </item>
    <item> Third item outer </item>
  </list>
</document>

Relax NG follows:

<grammar xmlns="http://relaxng.org/ns/structure/1.0">

<start>
<element name="document">
   <oneOrMore>
      <ref name="list-defn"/>
   </oneOrMore>
</element>
</start>

<define name="list-defn">
   <element name="list">
      <oneOrMore>
         <element name="item">
            <choice>
               <text />
               <ref name="list-defn"/>
            </choice>
         </element>
      </oneOrMore>
   </element>
</define>

</grammar>

Here's what Trang makes of it (with blank lines inserted for ease of
reading).

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">
  <xs:element name="document">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="list"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="list">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="item"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  
  <xs:element name="item">
    <xs:complexType mixed="true">
      <xs:sequence>
        <xs:element minOccurs="0" ref="list"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

But the "item" element is NOT mixed; if you make an item mixed as 
follows, then it's invalid according to Relax NG, but not according to
XML Schema.

<item> some text and a...
   <list>
      <item>nested</item>
   </list>
</item>

My questions are:

1) Can I write an XML Schema that will do exactly the same thing that
   the Relax NG does?
2) If so, how many hoops must I jump through to accomplish it?
3) I'm sure Trang's output is reasonable, but I don't understand the
   reasoning.  Any simple explanations?

-- 
J. David Eisenberg  http://catcode.com/


From dvd@davidashen.net Sat Oct 25 10:20:45 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9P3Kg7i098675
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 10:20:44 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9P3Hrgv078560
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 08:17:53 +0500 (AMST)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9P3HpTK078559
	for relaxng-user@relaxng.org; Sat, 25 Oct 2003 08:17:51 +0500 (AMST)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310250317.h9P3HpTK078559@adat.davidashen.net>
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
In-Reply-To: <1067036716.21207.303.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Sat, 25 Oct 2003 08:17:51 +0500 (AMST)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 25 Oct 2003 03:20:46 -0000

> > My opinion is that this association should be
> > obligatory once present and could not be overriden.
> 
> It's a basic tenet of RELAX NG that the schema is not inherent in the
> document and that validation is a process that has two
> independently-specifiable inputs.  Section 8 of the spec says: "A
> conforming RELAX NG validator must be able to determine for any XML
> document and for any correct RELAX NG schema whether the document is
> valid with respect to the schema."  If I understand you correctly,
> you're saying that if the document contains a particular processing
> instruction, then there should not be a way to validate it against a
> schema other than that specified in the processing instruction.  That's
> clearly non-conformant. A conforming RELAX NG validator must allow you
> to use any schema to validate a document, no matter what processing
> instruction the document contains.

Yes, I am aware of it. I am saying that any engine using inference rules to
determine the right association should have a well-defined single highest-priority
rule, which is, when matched, cannot be overriden by any others.

This has nothing to do with the ability to validate with various schemas. The validator
itself does not even look at these rules. It validates.  It can be passed any document
and any schema, for example, by specifying the schema explicitely.

But I want to make sure that I have a way to specify something about the document that
does not allow racing matches. That way I am always sure that on my system a document
I am explicit about its type is validated in a way I have specified for this type,
whatever other rules sale. And this specific association can be expressed in a more
persistent way than jing's command line.

Other inference rules will still be used if a highest priority rule does not match, and it
is a good thing. I just want explicit typing bound to a document, not to a keyboard keystroke.

I surely understand something wrong. I am taking a pause until I realize what in particular.

David Tolpin
http://davidashen.net/

From jjc@jclark.com Sat Oct 25 11:05:39 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9P45asH004327
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 11:05:38 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9P45KY26815; Sat, 25 Oct 2003 11:05:20 +0700
Subject: Re: [relaxng-user] Trang handling of (text|element) content
From: James Clark <jjc@jclark.com>
To: "J. David Eisenberg" <catcode@catcode.com>
In-Reply-To: <Pine.LNX.4.44.0310241925060.29421-100000@tengu.host4u.net>
References: <Pine.LNX.4.44.0310241925060.29421-100000@tengu.host4u.net>
Content-Type: text/plain
Organization: 
Message-Id: <1067054519.21207.328.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Sat, 25 Oct 2003 04:05:40 -0000
X-Original-Date: 25 Oct 2003 11:01:59 +0700
X-List-Received-Date: Sat, 25 Oct 2003 04:05:40 -0000

On Sat, 2003-10-25 at 07:36, J. David Eisenberg wrote:

> One example is a document that consists of one or more lists.
> A list consists of one or more items. Each item consists of text
> or a list.

> 1) Can I write an XML Schema that will do exactly the same thing that
>    the Relax NG does?

IIRC, no.  Content models in XSD have atoms that match elements.

> 3) I'm sure Trang's output is reasonable, but I don't understand the
>    reasoning.  Any simple explanations?

When some RELAX NG schema cannot be translated exactly into XML Schema,
Trang approximates by generalizing: it finds some XML Schema that allows
everything that the RELAX NG allows, even if some things forbidden by
the RELAX NG are not forbidden by the XML Schema.

James



From dpawson@nildram.co.uk Sat Oct 25 20:15:59 2003
Received: from smithers.nildram.co.uk (smithers.nildram.co.uk [195.112.4.34])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9PDFwts061164
	for <relaxng-user@relaxng.org>; Sat, 25 Oct 2003 20:15:59 +0700 (ICT)
Received: from main.nildram.co.uk (dpawson.gotadsl.co.uk [81.6.251.105])
	by smithers.nildram.co.uk (Postfix) with ESMTP
	id 0EC86278622; Sat, 25 Oct 2003 14:15:54 +0100 (BST)
Message-Id: <5.2.0.9.2.20031025141556.027bf968@pop3.Nildram.co.uk>
X-Sender: dpawson@pop3.Nildram.co.uk
X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9
Date: Sat, 25 Oct 2003 14:16:32 +0100
To: John Cowan <jcowan@reutershealth.com>
From: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] association of RELAX NG with a document
In-Reply-To: <20031023175122.GE24090@skunk.reutershealth.com>
References: <200310231440.h9NEeE4q062429@adat.davidashen.net>
	<20031023124307.GI19975@mercury.ccil.org>
	<200310231440.h9NEeE4q062429@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 25 Oct 2003 13:16:00 -0000

At 13:51 23/10/2003 -0400, John Cowan wrote:
>David Tolpin scripsit:
>
> > In simpler words, the people who designed the
> > technology don't see a consistent way to formally express an
> > association that already exists, or didn't implement it yet.
>
>It's part of the general problem of specifying appropriate XML
>processing; an RNG-specific solution is neither particularly
>general nor, IMHO, particularly useful.
>
> > If I
> > pretend that a document is valid against a RNG schema, how would I
> > formally express it in a standard way?
>
>How about this:
>
><?xml version="1.0"?>
><rdf:RDF

Enough. No thanks John.

regards daveP



From pri@ddf.dk Sun Oct 26 02:50:03 2003
Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [193.162.153.3])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9PJnvT3005842
	for <relaxng-user@relaxng.org>; Sun, 26 Oct 2003 02:50:03 +0700 (ICT)
Received: from ddf.dk (unknown [62.243.82.88])
	by pfepb.post.tele.dk (Postfix) with ESMTP
	id 02D595EE0ED; Sat, 25 Oct 2003 21:49:46 +0200 (CEST)
Message-ID: <3F9AD3CF.4000109@ddf.dk>
Date: Sat, 25 Oct 2003 21:49:35 +0200
From: Peter Ring <pri@ddf.dk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
References: <200310250317.h9P3HpTK078559@adat.davidashen.net>
In-Reply-To: <200310250317.h9P3HpTK078559@adat.davidashen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 25 Oct 2003 19:50:03 -0000

I'm in sympathy with the desire not to gamble about what can be asserted 
about an XML instance. I'll elaborate a bit about why.

I'm in favor of something similar to SGML's DOCTYPE. I'm aware of the 
bagage of DOCTYPE, but please, if just for a moment, consider that all 
the funny and peculiar features of SGML are there for a reason -- 
because someone actually needed them -- and that those needs don't go 
away just because we restrict the choice of encodings and markup delimiters.

So maybe a DOCTYPE is overloaded with default attribute values etc. It 
also serves a more abstract purpose that won't ever go away -- it's a 
way to establish a contract between the producer and the consumers of a 
document. That a DOCTYPE declaration can refer to the external subset of 
a SGML or XML DTD happens to be a way to fulfil that purpose.

 From a user's point of view, it is not that important that Relax NG 
fundamentally is a better way of describing syntax if you won't be able 
to use it in a reliable and predictable way.

I my world, there's nothing special about SGML and XML documents. They 
serve a number of purposes, but always as means to end, i.e., nobody 
actually wants 'XML documents', rather some business goal must be 
fulfilled, legal publishing in my case. Configuration management is 
inherent in the process, it is *not* an option. Documents have very long 
and complex lifecycles, and change is inevitable and must be planned for.

Now, versioning (configuration management) of XML languages and 
vocabularies is not easy, the DOCTYPE declaration clearly doesn't fit 
the bill, and XML namespaces appear to be as much a part of the problem 
as the solution. But couldn't we at least have one (1) standard way of 
asserting that a XML document belongs to a (version of) a specific class 
of documents, "expressed in a more persistent way than jing's command 
line"?

Kind regards
Peter Ring

David Tolpin wrote:
<snip/>
> But I want to make sure that I have a way to specify something about the document that
> does not allow racing matches. That way I am always sure that on my system a document
> I am explicit about its type is validated in a way I have specified for this type,
> whatever other rules sale. And this specific association can be expressed in a more
> persistent way than jing's command line.
> 
> Other inference rules will still be used if a highest priority rule does not match, and it
> is a good thing. I just want explicit typing bound to a document, not to a keyboard keystroke.
> 
> I surely understand something wrong. I am taking a pause until I realize what in particular.


From jjc@jclark.com Sun Oct 26 13:07:34 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9Q67VfC073604
	for <relaxng-user@relaxng.org>; Sun, 26 Oct 2003 13:07:33 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9Q67FY14285; Sun, 26 Oct 2003 13:07:15 +0700
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
From: James Clark <jjc@jclark.com>
To: Peter Ring <pri@ddf.dk>
In-Reply-To: <3F9AD3CF.4000109@ddf.dk>
References: <200310250317.h9P3HpTK078559@adat.davidashen.net>
	<3F9AD3CF.4000109@ddf.dk>
Content-Type: text/plain
Organization: 
Message-Id: <1067148215.21207.387.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Sun, 26 Oct 2003 06:07:39 -0000
X-Original-Date: 26 Oct 2003 13:03:35 +0700
X-List-Received-Date: Sun, 26 Oct 2003 06:07:39 -0000

On Sun, 2003-10-26 at 02:49, Peter Ring wrote:

> I'm in favor of something similar to SGML's DOCTYPE. I'm aware of the 
> bagage of DOCTYPE, but please, if just for a moment, consider that all 
> the funny and peculiar features of SGML are there for a reason -- 
> because someone actually needed them -- and that those needs don't go 
> away just because we restrict the choice of encodings and markup delimiters.
> 
> So maybe a DOCTYPE is overloaded with default attribute values etc. It 
> also serves a more abstract purpose that won't ever go away -- it's a 
> way to establish a contract between the producer and the consumers of a 
> document. That a DOCTYPE declaration can refer to the external subset of 
> a SGML or XML DTD happens to be a way to fulfil that purpose.

A DOCTYPE declaration does nothing more than identify the external
subset.  Eliot Kimber is eloquent on this one.  See for example the
thread at

http://lists.w3.org/Archives/Public/www-html/2000Jan/thread.html#66

> Documents have very long 
> and complex lifecycles, and change is inevitable and must be planned for.

Which is exactly why your documents should not contain anything specific
to a particular schema language.  Who knows what schema language we'll
all be using in 20 years?

> But couldn't we at least have one (1) standard way of 
> asserting that a XML document belongs to a (version of) a specific class 
> of documents

The assertion shouldn't be specific to a particular schema language. The
assertion should be an assertion that the document belongs to a
particular abstract type; an abstract document type involves more than
just the (usually infinite) set of documents belonging to the type;
there's also semantics, whether formal or informal.

There is no standardized way to make such an assertion. It's not the job
of RELAX NG (or indeed of any particular schema language) to standardize
such a mechanism.  If you want there to be a standard way, I suggest you
take it up with the W3C or some other standards body. 

I agree that it's often desirable to have a document include information
about the abstract type to which it belongs.  But it's up to you to
decide how your documents should represent this information, just like
it's up to you to decide how they should represent any other
information. If namespaces aren't enough, then use a PI or use an
attribute on the document element. The choice is yours. A schema
association mechanism should be able to make use of whatever reasonable
way you've chosen rather than mandate a particular way.

James





From pri@ddf.dk Sun Oct 26 18:29:56 2003
Received: from pfepa.post.tele.dk (pfepa.post.tele.dk [193.162.153.2])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9QBTueG004631
	for <relaxng-user@relaxng.org>; Sun, 26 Oct 2003 18:29:56 +0700 (ICT)
Received: from ddf.dk (unknown [62.243.82.88])
	by pfepa.post.tele.dk (Postfix) with ESMTP
	id 42DF3480072; Sun, 26 Oct 2003 12:29:50 +0100 (CET)
Message-ID: <3F9BB02F.9000507@ddf.dk>
Date: Sun, 26 Oct 2003 12:29:51 +0100
From: Peter Ring <pri@ddf.dk>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.4) Gecko/20030624
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: James Clark <jjc@jclark.com>
Subject: Re: [relaxng-user] Re: association of RELAX NG with a document
References: <200310250317.h9P3HpTK078559@adat.davidashen.net>	
	<3F9AD3CF.4000109@ddf.dk>
	<1067148215.21207.387.camel@rambutan.bkk.thaiopensource.com>
In-Reply-To: <1067148215.21207.387.camel@rambutan.bkk.thaiopensource.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 26 Oct 2003 11:29:57 -0000

Thanks for the pointer to the XHTML DOCTYPE discussion; I'm going to 
read up on ISO/IEC 10744:1997.

To sum up for now, I'd prefer not to (have to) put schema-specific in 
the documents, given that the assertion shouldn't be specific to a 
particular schema language (or any other processing). I'd prefer not to 
maintain an unbounded number of ways to facilitate essentially the same 
thing (to classify a document and take appropriate action).

Also, given that the main point of using XML is neutral storage and 
interchange, it would shure be nice if we had a few common access points 
that all XML producers and consumers could rely on. While I can 
establish a local way of representing the class of a document, I can't 
expect the off-the-shelf applications that we use today to know about 
it. And, there's no way I can know which XML producers and consumers 
I'll have to deal with tomorrow.

Of course, it's not the duty of Relax NG to solve this problem. It's 
just that Relax NG is a hot spot for this discussion right now.

Kind regards
Peter Ring

James Clark wrote:

<snip/>
> The assertion shouldn't be specific to a particular schema language. The
> assertion should be an assertion that the document belongs to a
> particular abstract type; an abstract document type involves more than
> just the (usually infinite) set of documents belonging to the type;
> there's also semantics, whether formal or informal.
> 
> There is no standardized way to make such an assertion. It's not the job
> of RELAX NG (or indeed of any particular schema language) to standardize
> such a mechanism.  If you want there to be a standard way, I suggest you
> take it up with the W3C or some other standards body. 
> 
> I agree that it's often desirable to have a document include information
> about the abstract type to which it belongs.  But it's up to you to
> decide how your documents should represent this information, just like
> it's up to you to decide how they should represent any other
> information. If namespaces aren't enough, then use a PI or use an
> attribute on the document element. The choice is yours. A schema
> association mechanism should be able to make use of whatever reasonable
> way you've chosen rather than mandate a particular way.



From dvd@davidashen.net Wed Oct 29 02:31:12 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9SJV8Wc058612
	for <relaxng-user@relaxng.org>; Wed, 29 Oct 2003 02:31:10 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9SJRugv007346
	for <relaxng-user@relaxng.org>; Tue, 28 Oct 2003 23:27:56 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9SJRsO6007345
	for relaxng-user@relaxng.org; Tue, 28 Oct 2003 23:27:54 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310281927.h9SJRsO6007345@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Tue, 28 Oct 2003 23:27:54 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] relaxng-driven editing
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Oct 2003 19:31:13 -0000

Hi,

if I understand it correctly, relaxng-based editors use validation algorithm as described
in the paper about Jing (based on derivatives) to offer first elements of the current
derivative as possible alternatives.

However, for many practical cases, the set of valid elements at any given point is determined
by a small context of the point; for docbook, for example, it is one parent and one preceding
element for all cases. 

RELAX NG in general may require a wider context for this approach; due to its context-dependence.
Is there a known algorithm to build distinct lookback contexts?

David Tolpin
http://davidashen.net/

From jjc@jclark.com Thu Oct 30 10:16:59 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9U3Gvwe049495
	for <relaxng-user@relaxng.org>; Thu, 30 Oct 2003 10:16:58 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	h9U3DMY12884; Thu, 30 Oct 2003 10:13:23 +0700
Subject: Re: [relaxng-user] relaxng-driven editing
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200310281927.h9SJRsO6007345@adat.davidashen.net>
References: <200310281927.h9SJRsO6007345@adat.davidashen.net>
Content-Type: text/plain
Organization: 
Message-Id: <1067483394.12264.65.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Thu, 30 Oct 2003 03:17:00 -0000
X-Original-Date: 30 Oct 2003 10:09:55 +0700
X-List-Received-Date: Thu, 30 Oct 2003 03:17:00 -0000

On Wed, 2003-10-29 at 02:27, David Tolpin wrote:
> Hi,
> 
> if I understand it correctly, relaxng-based editors use validation algorithm as described
> in the paper about Jing (based on derivatives) to offer first elements of the current
> derivative as possible alternatives.
> 
> However, for many practical cases, the set of valid elements at any given point is determined
> by a small context of the point; for docbook, for example, it is one parent and one preceding
> element for all cases. 
> 
> RELAX NG in general may require a wider context for this approach; due to its context-dependence.
> Is there a known algorithm to build distinct lookback contexts?

I don't know of one, but I've never looked.  In nXML mode, I maintain
state that allows me to incrementally compute validity.  This state also
allows me to determine the derivative at any point, without having to
figure out what part of the context is relevant.  There's a long comment
at the beginning of the file rng-valid.el in the nXML mode distribution
that explains my approach.

James



From dvd@davidashen.net Thu Oct 30 15:23:43 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9U8NdOs014183
	for <relaxng-user@relaxng.org>; Thu, 30 Oct 2003 15:23:41 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9U8KHgv016440
	for <relaxng-user@relaxng.org>; Thu, 30 Oct 2003 12:20:17 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9U8KGZE016439
	for relaxng-user@relaxng.org; Thu, 30 Oct 2003 12:20:16 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310300820.h9U8KGZE016439@adat.davidashen.net>
Subject: Re: [relaxng-user] relaxng-driven editing
In-Reply-To: <1067483394.12264.65.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Thu, 30 Oct 2003 12:20:16 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Oct 2003 08:23:43 -0000

> > However, for many practical cases, the set of valid elements at any given point is determined
> > by a small context of the point; for docbook, for example, it is one parent and one preceding
> > element for all cases. 
> > 
> > RELAX NG in general may require a wider context for this approach; due to its context-dependence.
> > Is there a known algorithm to build distinct lookback contexts?
> 
> I don't know of one, but I've never looked.  In nXML mode, I maintain
> state that allows me to incrementally compute validity.  This state also
> allows me to determine the derivative at any point, without having to
> figure out what part of the context is relevant.  There's a long comment
> at the beginning of the file rng-valid.el in the nXML mode distribution
> that explains my approach.

James,

thank you. I had read the comment and the source code of nXML (an
exciting experience indeed) before posting the comment. I am also
familiar with a similar technique because  it had been used in a
pascal interpreter for secondary schools in early 90s (a demo with
coloring of up-to-date areas was nice).

The problem -- my problem -- is that I am writing a program that needs to know

1) not just the set of first elements in a pattern, but a set of
all elements of particular kind (block-level text markup -- para,
title, term, listitem) which do not have the opening tag of a
preceding element in this pattern.

      <listitem>
    </itemizedlist>
    (<para>|<itemizedlist><listitem/>+</itemizedlist>)
  </section>*
  <section>
    <title>
    ...

should bring '(listitem para title).

This has roughly exponential time compared to the time to compute first elements.

2) other contexts where b indirectly follows a, to decide whether it is appropriate to
offer to close a group and/or open a new one.  This requires (or I just think so) 
analysis of the grammar, not just of the derivative.

I tried to compute the things dynamically, but my algorithm was not fast enough to use
interactively. I'll try again, or maybe it's just my slow notebook.

Thank you again,
David Tolpin

From dvd@davidashen.net Thu Oct 30 15:28:05 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id h9U8S2Xb014662
	for <relaxng-user@relaxng.org>; Thu, 30 Oct 2003 15:28:04 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id h9U8Oegv016461
	for <relaxng-user@relaxng.org>; Thu, 30 Oct 2003 12:24:40 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id h9U8OeKc016460
	for relaxng-user@relaxng.org; Thu, 30 Oct 2003 12:24:40 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200310300824.h9U8OeKc016460@adat.davidashen.net>
In-Reply-To: <3FA05C02.8090508@datalucid.com>
To: relaxng-user@relaxng.org
Date: Thu, 30 Oct 2003 12:24:40 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] Re: Block border/padding behaviour
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 30 Oct 2003 08:28:06 -0000

> Setting margin-right='0pt' did create the effect I was after (although 
> produced some strange overlaps with borders on the next cell in my table).

That's right. margin-end was a typo.

> Also I'll have to check the difference between margin-end and 
> margin-right (or see whether it's just a processor implementation 
> difference).

The difference is in the time zone, not between implementations; I was writing
the answer at the end of the day.

> (Having worked on the formatting of corporate reports for over 10 years 
> and XSL-FO for the last 18 months
> I still find the XSL-FO specification over-complex in 'basic' areas 
> (e.g. margins) and deficient or unnatural in 'common' ones (e.g. 
> justification / leaders).
> Maybe I'm trying to fit it to the wrong perceptual model.)
> 

They are just different. (start-|end-)indent is zero, by default. It is turns to be convenient
if accepts the idea that borders are drawn around text, not text is printed inside borders.
For me, borders are decorations. 

What kind of problems do you have with justification/leaders, by the way?

David Tolpin

http://davidashen.net/

From jjc@jclark.com Sun Nov  2 06:54:16 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA1NsErY005054
	for <relaxng-user@relaxng.org>; Sun, 2 Nov 2003 06:54:15 +0700 (ICT)
Received: from [192.168.0.172] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	hA1NoIU27046; Sun, 2 Nov 2003 06:50:19 +0700
Subject: Re: [relaxng-user] relaxng-driven editing
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200310300820.h9U8KGZE016439@adat.davidashen.net>
References: <200310300820.h9U8KGZE016439@adat.davidashen.net>
Content-Type: text/plain
Organization: 
Message-Id: <1067730408.12264.297.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) 
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
Date: Sat, 01 Nov 2003 23:54:16 -0000
X-Original-Date: 02 Nov 2003 06:46:48 +0700
X-List-Received-Date: Sat, 01 Nov 2003 23:54:16 -0000

On Thu, 2003-10-30 at 15:20, David Tolpin wrote:

> The problem -- my problem -- is that I am writing a program that needs to know
> 
> 1) not just the set of first elements in a pattern, but a set of
> all elements of particular kind (block-level text markup -- para,
> title, term, listitem) which do not have the opening tag of a
> preceding element in this pattern.

I don't understand what you mean by "have the opening tag of a preceding
element in this pattern".

> 
>       <listitem>
>     </itemizedlist>
>     (<para>|<itemizedlist><listitem/>+</itemizedlist>)
>   </section>*
>   <section>
>     <title>
>     ...

Is this a description of a content model or an instance or both?

> should bring '(listitem para title).

Why?

> 2) other contexts where b indirectly follows a, to decide whether it is appropriate to
> offer to close a group and/or open a new one.

So you are currently in a chapter element, say, and you get a paragraph
of text indicative of the start of a section and you need to decide
whether to close the chapter before opening the section?  Is that the
problem? Why can't you do this on the basis of parent/child
relationships i.e. leave the chapter open iff the chapter can contain a
section?

I don't think I'm going to be able to help without a lot more detail
about the problem you're trying to solve.

James




From dvd@davidashen.net Sun Nov  2 15:25:01 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA28OvZ7059164
	for <relaxng-user@relaxng.org>; Sun, 2 Nov 2003 15:24:59 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA28LFgv037223
	for <relaxng-user@relaxng.org>; Sun, 2 Nov 2003 12:21:15 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA28LFPr037222
	for relaxng-user@relaxng.org; Sun, 2 Nov 2003 12:21:15 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311020821.hA28LFPr037222@adat.davidashen.net>
Subject: Re: [relaxng-user] relaxng-driven editing
In-Reply-To: <1067730408.12264.297.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Sun, 2 Nov 2003 12:21:15 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 02 Nov 2003 08:25:02 -0000

> > 1) not just the set of first elements in a pattern, but a set of
> > all elements of particular kind (block-level text markup -- para,
> > title, term, listitem) which do not have the opening tag of a
> > preceding element in this pattern.
> 
> I don't understand what you mean by "have the opening tag of a preceding
> element in this pattern".

In the derivative.  In other words,  any element that is the first block-level
markup element following the current context is allowed. This is how text documents
are normally entered, in my opinion. That is, one types the text, not the markup;
if a new chapter should be started, one types its title. The editor then recognizes
that it can be a title, offers to markup it as such (with other variants being
para or term, for example) and adds structural markup between the previous paragraph
and the current title as </section><section>, for example.

I have a proof-of-concept implementation of this approach
(http://davidashen.net/preti.html), which works for subsets of
docbook, xhtml and DITA; however, the algorithm to determine
structurally allowed elements and derive the group-level markup is
ugly.

Actually, writing a message helps understand the issue
better; I am now feeling I roughly understand the algorithm I need, 
and, you are right indeed, it should be based on computing derivatives.

> >       <listitem>
> >     </itemizedlist>
> >     (<para>|<itemizedlist><listitem/>+</itemizedlist>)
> >   </section>*
> >   <section>
> >     <title>
> >     ...
> 
> Is this a description of a content model or an instance or both?

This is a description of a content model (I forgot asterisk after <listitem> - and sorry
for the syntax, rnc would be more readable but I needed something that shows opening and closing
tags separately); this is a derivative after  a listitem is entered.

> 
> > should bring '(listitem para title).
> 
> Why?

Because the user does not enter markup. It enters text and then confirms, alters or rejects
tags which are offered by the program. 

> 
> > 2) other contexts where b indirectly follows a, to decide whether it is appropriate to
> > offer to close a group and/or open a new one.
> 
> So you are currently in a chapter element, say, and you get a paragraph
> of text indicative of the start of a section and you need to decide
> whether to close the chapter before opening the section?  Is that the
> problem? Why can't you do this on the basis of parent/child
> relationships i.e. leave the chapter open iff the chapter can contain a
> section?

You are right; however, if I am inside a listitem and get a title, I need to close  the item,
the list, then open a new section (or chapter - the user decides).  Whether I should close the
current section is a question the user should answer, because sections can be nested.

I see now that I can compute context based on derivatives. My problem with it is that
it is more convenient for the user to first confirm opening of a new group, then to deal
with closing current groups.

<para/>.<title/>-> <para/>.<section><title/> -> <para/></section>.<section></title> ->
                <para/></section></section>.<section><title>

But look like I can simply visit the nodes fro right to left, children first, to get
this sequence for the elements to open.

> 
> I don't think I'm going to be able to help without a lot more detail
> about the problem you're trying to solve.
> 

You are already helping, thank you.

David Tolpin
http://davidashen.net/

From dvd@davidashen.net Tue Nov  4 02:47:23 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA3JlIoF020602
	for <relaxng-user@relaxng.org>; Tue, 4 Nov 2003 02:47:21 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA3JhRgv044631
	for <relaxng-user@relaxng.org>; Mon, 3 Nov 2003 23:43:27 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA3JhPSU044630
	for relaxng-user@relaxng.org; Mon, 3 Nov 2003 23:43:25 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311031943.hA3JhPSU044630@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Mon, 3 Nov 2003 23:43:25 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] @name|name
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Nov 2003 19:47:23 -0000

Hi,

If an element node has both ./@name and ./name, is it an error or are they combined?

David Tolpin

From vdv@dyomedea.com Tue Nov  4 02:56:21 2003
Received: from gwparis.dyomedea.com
	(ASt-Lambert-102-1-1-8.w193-251.abo.wanadoo.fr [193.251.191.8])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA3JuJeG022220
	for <relaxng-user@relaxng.org>; Tue, 4 Nov 2003 02:56:20 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by gwparis.dyomedea.com (Postfix) with ESMTP
	id 144241AEA17; Mon,  3 Nov 2003 20:56:18 +0100 (CET)
Subject: Re: [relaxng-user] @name|name
From: Eric van der Vlist <vdv@dyomedea.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200311031943.hA3JhPSU044630@adat.davidashen.net>
References: <200311031943.hA3JhPSU044630@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1067889377.5887.525.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Mon, 03 Nov 2003 20:56:18 +0100
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 03 Nov 2003 19:56:21 -0000

On Mon, 2003-11-03 at 20:43, David Tolpin wrote:
> Hi,
> 
> If an element node has both ./@name and ./name, is it an error or are they combined?

If you mean a pattern element, it's an error, but you can explicitly
combine two name name classes through a "choice", for instance:

<element>
 <choice>
  <name>foo</name>
  <name>bar</name>
 </choice>
 <empty/>
</element>

Eric
-- 
Read me on XMLhack.
                                      http://xmlhack.com/author.php?id=8
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)       http://makeashorterlink.com/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)             http://makeashorterlink.com/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Wed Nov  5 21:13:17 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA5EDCGd073111
	for <relaxng-user@relaxng.org>; Wed, 5 Nov 2003 21:13:15 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA5E99gv056576
	for <relaxng-user@relaxng.org>; Wed, 5 Nov 2003 18:09:09 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA5E95r6056575
	for relaxng-user@relaxng.org; Wed, 5 Nov 2003 18:09:05 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311051409.hA5E95r6056575@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Wed, 5 Nov 2003 18:09:05 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] engTagDeriv
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2003 14:13:18 -0000

Hi,

Am I right in assuming that if I add the element's name to the After pattern, and then
compare it with the name of the closing tag, I can check for well-formedness during
validation? That is, instead of maintaining a separate stack of open elements, I can
keep the values in After patterns?

Or am I missing something obvious?

David Tolpin

From dvd@davidashen.net Thu Nov  6 03:25:09 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA5KP6uS036813
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 03:25:08 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA5KL2gv058155
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 00:21:02 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA5KL1Ph058154
	for relaxng-user@relaxng.org; Thu, 6 Nov 2003 00:21:01 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311052021.hA5KL1Ph058154@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Thu, 6 Nov 2003 00:21:01 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] <attribute/> after <text/>?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2003 20:25:11 -0000

Hi,

is it legal to have

<element name="x">
  <text/>
  <attribute name="y"/>
</element>

?


From jcowan@reutershealth.com Thu Nov  6 04:36:14 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA5LaE0i047620
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 04:36:14 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id QAA08586; 
	Wed, 5 Nov 2003 16:26:57 -0500 (EST)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Wed, 5 Nov 2003 16:31:54 -0500
Date: Wed, 5 Nov 2003 16:31:54 -0500
From: John Cowan <jcowan@reutershealth.com>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] <attribute/> after <text/>?
Message-ID: <20031105213154.GK18857@skunk.reutershealth.com>
References: <200311052021.hA5KL1Ph058154@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200311052021.hA5KL1Ph058154@adat.davidashen.net>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2003 21:36:16 -0000

David Tolpin scripsit:

> is it legal to have
> 
> <element name="x">
>   <text/>
>   <attribute name="y"/>
> </element>

Sure.  Because attribute ordering doesn't matter in XML, RNG always treats
attribute patterns in a group pattern (in this case, an implicit one)
as if they were interleaved.  Therefore, they can appear in any position
when they are children of an element pattern.

-- 
Using RELAX NG compact syntax to        John Cowan
develop schemas is one of the simple    http://www.reutershealth.com
pleasures in life....                   http://www.ccil.org/~cowan
        --Jeni Tennison                 <jcowan@reutershealth.com>

From dvd@davidashen.net Thu Nov  6 04:53:53 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA5LroeX050138
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 04:53:52 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA5Lnjgv058635
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 01:49:45 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA5Lnj7M058634
	for relaxng-user@relaxng.org; Thu, 6 Nov 2003 01:49:45 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311052149.hA5Lnj7M058634@adat.davidashen.net>
Subject: Re: [relaxng-user] <attribute/> after <text/>?
In-Reply-To: <20031105213154.GK18857@skunk.reutershealth.com>
To: relaxng-user@relaxng.org
Date: Thu, 6 Nov 2003 01:49:45 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2003 21:53:53 -0000

> > </element>
> 
> Sure.  Because attribute ordering doesn't matter in XML, RNG always treats
> attribute patterns in a group pattern (in this case, an implicit one)
> as if they were interleaved.  Therefore, they can appear in any position
> when they are children of an element pattern.

Thank you, I realized it shortly after asking, I'm sorry for the noise. I mean,
not the attributes' ordering, but the correct way to compute the derivative. 

Does <attribute name="x"><empty/></attribute> match an attribute value consisting
only of whitespace? 

David

From jcowan@reutershealth.com Thu Nov  6 05:14:13 2003
Received: from mail.reutershealth.com ([65.246.141.36])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA5MEDlt053341
	for <relaxng-user@relaxng.org>; Thu, 6 Nov 2003 05:14:13 +0700 (ICT)
Received: from skunk.reutershealth.com (mail [65.246.141.36])
	by mail.reutershealth.com (Pro-8.9.3/Pro-8.9.3) with SMTP id RAA09164; 
	Wed, 5 Nov 2003 17:05:24 -0500 (EST)
Received: by skunk.reutershealth.com (sSMTP sendmail emulation);
	Wed, 5 Nov 2003 17:10:21 -0500
Date: Wed, 5 Nov 2003 17:10:21 -0500
From: John Cowan <jcowan@reutershealth.com>
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] <attribute/> after <text/>?
Message-ID: <20031105221021.GP18857@skunk.reutershealth.com>
References: <20031105213154.GK18857@skunk.reutershealth.com>
	<200311052149.hA5Lnj7M058634@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200311052149.hA5Lnj7M058634@adat.davidashen.net>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 05 Nov 2003 22:14:13 -0000

David Tolpin scripsit:

> Does <attribute name="x"><empty/></attribute> match an attribute value consisting
> only of whitespace? 

Yes.  The only time whitespace is not ignored is in data or value patterns
where the datatype preserves it, which in practice is only in string and
xsd:string.

-- 
All Gaul is divided into three parts: the part          John Cowan
that cooks with lard and goose fat, the part            www.ccil.org/~cowan
that cooks with olive oil, and the part that            www.reutershealth.com
cooks with butter. -- David Chessler                    jcowan@reutershealth.com

From dvd@davidashen.net Fri Nov  7 06:40:24 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA6NeK0b068067
	for <relaxng-user@relaxng.org>; Fri, 7 Nov 2003 06:40:22 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hA6Na8gv064177
	for <relaxng-user@relaxng.org>; Fri, 7 Nov 2003 03:36:08 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hA6Na20L064176
	for relaxng-user@relaxng.org; Fri, 7 Nov 2003 03:36:02 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311062336.hA6Na20L064176@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Fri, 7 Nov 2003 03:36:02 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] reversed derivative?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 06 Nov 2003 23:40:25 -0000

Hi,

I am implementing an authoring tool for structured documents. The
key feature of this tool is that the user enters just text, consisting
of paragraphs. The editor offers feasible tags  for the paragraphs,
based on the structural features of the paragraph and on the context,
and then offers alternative tag sequences between the current and
the previous paragraph.

That is,  for grammar

start = element book { title, chapter* }
title = element title { text }
section = element section { title, block* }
chapter = element chapter { title, block*, section* }
block =
  element para { text }
  | element list {
      element item { text }+
    }

  - if something looking as a <title> is entered inside a <list>,
    and if user confirms that it is indeed a <title>,
  - the <list> will be closed, a new <section> or <chapter> will be opened
  - optionally, the current <section> (and <chapter>) will be closed.

A preliminary version was implemented and appears to be useful. However,
the algorithms used are not appropriate for unrestricted grammars.

I have been able to re-implement the algorithms using the validation
algorithm as described at
http://www.thaiopensource.com/relaxng/derivative.html, with obvious
extensions needed to compute all possible paths between the current
and the previous paragraphs.

However, the straightforward extension requires that decisions are
made in the document order, that is, first elements are closed,
then opened top-down. It appears to be more convenient and natural,
however (the previous version had an option which allowed to choose
the order) to
  - first open new group tags, bottom-up (that is,
    term->varlistentry->variablelist)
  - then offer to close, again bottom-up currently open tags which can
    optionally be closed.
  (open elements which are to be closed in all alternatives are closed as soon
  as possible).

I would be grateful for a hint or a pointer to a source which can
help me implement this behaviour.

I am trying to build the ascending parts suitable for reverse
reduction by traversing the schema from right to left and precomputing
the derivatives for all block-level elements, but am not sure that
I am moving in the right direction.

Sincerely,
David Tolpin
http://davidashen.net/

From dkuhlman@cutter.rexx.com Fri Nov  7 09:08:23 2003
Received: from cutter.rexx.com (root@ias-207-167-89-8.icg.znet.net
	[207.167.89.8])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA728MX5088761
	for <relaxng-user@relaxng.org>; Fri, 7 Nov 2003 09:08:23 +0700 (ICT)
Received: (from dkuhlman@localhost)
	by cutter.rexx.com (8.11.1/8.9.3) id hA728GR90106
	for relaxng-user@relaxng.org; Thu, 6 Nov 2003 18:08:16 -0800 (PST)
	(envelope-from dkuhlman)
Date: Thu, 6 Nov 2003 18:08:16 -0800
From: Dave Kuhlman <dkuhlman@cutter.rexx.com>
To: relaxng-user@relaxng.org
Message-ID: <20031106180816.A89573@cutter.rexx.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.4i
Subject: [relaxng-user] Python support for RELAX NG?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Nov 2003 02:08:24 -0000


Is there someplace I can look for Python support for RELAX NG?

I searched the RELAX NG email list archives and also did a Web
search.

I've found A.M. Kuchling's parser for the XML syntax, and I'm
looking into that.

I've written quite a bit of a parser for the compact syntax. I'm
using PLY to build the parser: http://systems.cs.uchicago.edu/ply/.
I'd like to know if it's already been done before continuing.

Dave

-- 
Dave Kuhlman
dkuhlman@rexx.com
http://www.rexx.com/~dkuhlman

From amk@amk.ca Fri Nov  7 09:18:07 2003
Received: from mail.speakeasy.net (mail8.speakeasy.net [216.254.0.208])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hA72I6ij090213
	for <relaxng-user@relaxng.org>; Fri, 7 Nov 2003 09:18:06 +0700 (ICT)
Received: (qmail 26466 invoked from network); 7 Nov 2003 02:18:05 -0000
Received: from unknown (HELO rogue.amk.ca) ([66.92.163.165])
	(envelope-sender <amk@amk.ca>)
	by mail8.speakeasy.net (qmail-ldap-1.03) with RC4-SHA encrypted SMTP
	for <relaxng-user@relaxng.org>; 7 Nov 2003 02:18:05 -0000
Received: from amk by rogue.amk.ca with local (Exim 4.24) id 1AHwC8-0003TR-Al
	for relaxng-user@relaxng.org; Thu, 06 Nov 2003 21:17:52 -0500
Date: Thu, 6 Nov 2003 21:17:52 -0500
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] Python support for RELAX NG?
Message-ID: <20031107021752.GB13333@rogue.amk.ca>
Mail-Followup-To: amk@amk.ca, relaxng-user@relaxng.org
References: <20031106180816.A89573@cutter.rexx.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20031106180816.A89573@cutter.rexx.com>
User-Agent: Mutt/1.5.4i
From: "A.M. Kuchling" <amk@amk.ca>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: amk@amk.ca
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 07 Nov 2003 02:18:07 -0000

On Thu, Nov 06, 2003 at 06:08:16PM -0800, Dave Kuhlman wrote:
> Is there someplace I can look for Python support for RELAX NG?

I have a page of rough notes at http://www.amk.ca/notes/rng.html .
libxml2 (www.xmlsoft.org) includes a RELAX NG validator and comes with
Python bindings.

> I've written quite a bit of a parser for the compact syntax. I'm
> using PLY to build the parser: http://systems.cs.uchicago.edu/ply/.
> I'd like to know if it's already been done before continuing.

David Mertz has a Python script that's supposed to translate from
RNC to RNG, but when I tried it on the RELAX NG schema, it crashed.
There's a link to it from my notes.

--amk

From bdarcus@fastmail.fm Thu Nov 13 22:43:13 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hADFh7jK026994
	for <relaxng-user@relaxng.org>; Thu, 13 Nov 2003 22:43:13 +0700 (ICT)
X-Sasl-enc: VRKZS7hOzHFO2M/4KgrV7g 1068738179
Received: from [134.53.28.175] (u175.s28.muohio.edu [134.53.28.175])
	by mail.messagingengine.com (Postfix) with ESMTP id 2D94D40472C
	for <relaxng-user@relaxng.org>; Thu, 13 Nov 2003 10:42:59 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
Content-Transfer-Encoding: 7bit
Message-Id: <14E1063A-15F0-11D8-869B-000A95B10832@fastmail.fm>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: relaxng-user@relaxng.org
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Date: Thu, 13 Nov 2003 10:43:09 -0500
X-Mailer: Apple Mail (2.606)
Subject: [relaxng-user] customization layers in rnc?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 13 Nov 2003 15:43:14 -0000


Can someone please help me understand how to implement the following  
customization layer for the DocBook DTD in RNC?

Simply running Trang on it gets me the following error:

	dbcitx.dtd:21:67: fatal: syntax error

Bruce
------------------------------------------------------------------------ 
---------------------------------
<!-- This is a customization layer for DocBook XML 4.1.2 which  
implements
      RFE 810932 - improved citation support -->

<!ENTITY % citation.module "IGNORE">
<!ENTITY % citation.element "IGNORE">
<!ENTITY % citation.attlist "IGNORE">

<!ENTITY % blockquote.module "IGNORE">
<!ENTITY % blockquote.element "IGNORE">
<!ENTITY % blockquote.attlist "IGNORE">

<!ENTITY % quote.module "IGNORE">
<!ENTITY % quote.element "IGNORE">
<!ENTITY % quote.attlist "IGNORE">

<!ENTITY % epigraph.module "IGNORE">
<!ENTITY % epigraph.element "IGNORE">
<!ENTITY % epigraph.attlist "IGNORE">

<!-- load original DocBook stuff -->
<!ENTITY % DocBookDTD PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN">
%DocBookDTD;

<!-- extend the citation element.
      we add two attributes: renderas (select the processing  
expectations)
                             caption (provide additional text)
      we add one element:    Biblioref (extended bibliographic data)
-->

<!ENTITY % local.citation.attrib "">
<!ENTITY % citation.role.attrib "%role.attrib;">

<!ELEMENT biblioref - - EMPTY>
<!ATTLIST biblioref linkend IDREF #IMPLIED
                         endterm IDREF #IMPLIED
                         unit NMTOKEN #IMPLIED
                         start NMTOKEN #IMPLIED
                         stop NMTOKEN #IMPLIED
>

<!ELEMENT citation - - ((%para.char.mix;|biblioref)+)>

<!ATTLIST citation
                 %common.attrib;
                 %citation.role.attrib;
                 %local.citation.attrib;
                 renderas (full|author|year|title) "full"
                 caption CDATA #IMPLIED
>

<!-- done with the citation element -->

<!-- extend the blockquote element -->
<!ENTITY % local.blockquote.attrib "">
<!ENTITY % blockquote.role.attrib "%role.attrib;">

<!ELEMENT blockquote - - (title?, attribution?, (%component.mix;)+,  
biblioref?)>

<!ATTLIST blockquote
                 %common.attrib;
                 %blockquote.role.attrib;
                 %local.blockquote.attrib;
>

<!-- done with blockquote -->

<!-- extend the quote element -->
<!ENTITY % local.quote.attrib "">
<!ENTITY % quote.role.attrib "%role.attrib;">

<!ELEMENT quote - - ((%para.char.mix;)+, biblioref?)>

<!ATTLIST quote
                 %common.attrib;
                 %quote.role.attrib;
                 %local.quote.attrib;
>

<!-- done with quote -->

<!-- extend the epigraph element -->
<!ENTITY % local.epigraph.attrib "">
<!ENTITY % epigraph.role.attrib "%role.attrib;">

<!ELEMENT epigraph - - (attribution?, (%para.class;)+, biblioref?)>

<!ATTLIST epigraph
                 %common.attrib;
                 %epigraph.role.attrib;
                 %local.epigraph.attrib;
>
<!-- done with epigraph -->


From bdarcus@fastmail.fm Sun Nov 16 00:08:01 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAFH7q1N015472
	for <relaxng-user@relaxng.org>; Sun, 16 Nov 2003 00:08:01 +0700 (ICT)
X-Sasl-enc: 696kUw7wAVHJog3ABbrM8g 1068916063
Received: from [134.53.28.204] (u204.s28.muohio.edu [134.53.28.204])
	by mail.messagingengine.com (Postfix) with ESMTP id 8EA17412676
	for <relaxng-user@relaxng.org>; Sat, 15 Nov 2003 12:07:42 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
Content-Transfer-Encoding: 7bit
Message-Id: <42E65845-178E-11D8-869B-000A95B10832@fastmail.fm>
Content-Type: text/plain; charset=US-ASCII; format=flowed
To: relaxng-user@relaxng.org
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Date: Sat, 15 Nov 2003 12:07:58 -0500
X-Mailer: Apple Mail (2.606)
Subject: [relaxng-user] customization layer in relax ng?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 15 Nov 2003 17:08:02 -0000

Regarding previous post on customization layer in rnc, I think I've 
gotten most of the way to implementing it, but I'm now stuck.  I think 
I'm just unclear about where to put the damned curly-brackets when 
redefining elements.  Help, please.

Bruce

================================================
include "docbook.rnc"

biblioref = element biblioref { biblioref.attlist }
biblioref.attlist &=
    attribute linkend { xsd:IDREF },
    attribute endterm { xsd:IDREF },
    attribute unit { xsd:token },
    attribute start {xsd:token },
    attribute stop { xsd:token }

citation = para.char.mix*,
    biblioref*,
       citation.attlist

citation.attlist &=
    common.attrib,
    citation.role.attrib,
    local.citation.attrib,
    attribute renderas { "full" | "author" | "year" | "title" }?,
    attribute caption { text }?
    }
# done with the citation element

# extend the blockquote element
local.blockquote.attrib = blockquote.role.attrib
blockquote.role.attrib = role.attrib

blockquote = title?,
    attribution?,
    component.mix+,
    biblioref?,
    blockquote.attlist

blockquote.attlist &=
    common.attrib,
    blockquote.role.attrib,
    local.blockquote.attrib

# done with blockquote


From bdarcus@fastmail.fm Fri Nov 21 05:27:19 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAKMREUB016479
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 05:27:19 +0700 (ICT)
X-Sasl-enc: nZVQE75SBfpZPhjq7VWJmA 1069367224
Received: from fastmail.fm (unknown [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id 384BB437705
	for <relaxng-user@relaxng.org>; Thu, 20 Nov 2003 17:27:03 -0500 (EST)
Date: Thu, 20 Nov 2003 17:27:00 -0500
Mime-Version: 1.0 (Apple Message framework v552)
Content-Type: text/plain; charset=US-ASCII; format=flowed
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
Message-Id: <A8B783F2-1BA8-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
Subject: [relaxng-user] combining schemas
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Nov 2003 22:27:21 -0000

I'm interested in experimenting with mixing docbook with a separate 
namespaced metadata schema, but I seem to be stuck with a "duplicate 
definition of start" error that I don't know how to get rid of.

Basically I want an instance like so:

<document>
    <meta>
       <mods:name/>
       <mods:titleInfo/>
    </meta>
    <content>
       <section>
          <title>Introduction</title>
          <para>blah, blah, blah</para>
       </section>
    </content>
</document>

You could imagine Dublin Core in place of MODS.

Here's what I have at the moment:
===============================
start = document
include "docbook.rnc"
include "mods3.rnc"
document = element document { meta, content }
meta = ModsSchema
content = { "article" | "book" | "chapter" }
===============================

What am I doing wrong??

Bruce


From vdv@dyomedea.com Fri Nov 21 05:47:01 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAKMkxJU019201
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 05:47:00 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP
	id 388E8BC54; Thu, 20 Nov 2003 23:46:26 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
In-Reply-To: <A8B783F2-1BA8-11D8-BDCA-000A959F0E52@fastmail.fm>
References: <A8B783F2-1BA8-11D8-BDCA-000A959F0E52@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069368413.21694.83.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Thu, 20 Nov 2003 23:46:53 +0100
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 20 Nov 2003 22:47:00 -0000

Hi,

On Thu, 2003-11-20 at 23:27, Bruce D'Arcus wrote:

> 
> Here's what I have at the moment:
> ===============================
> start = document
> include "docbook.rnc"
> include "mods3.rnc"
> document = element document { meta, content }
> meta = ModsSchema
> content = { "article" | "book" | "chapter" }
> ===============================
> 
> What am I doing wrong??

If you include the schema for docbook, you need to either redefine the
start pattern defined in the schema for docbook or combine its content
with a new one. Since here you want to replace its definition, the only
option left is to redefine it:


include "docbook.rnc" {
  start = document
}
include "mods3.rnc"
document = element document { meta, content }
meta = ModsSchema
content = { "article" | "book" | "chapter" }

BTW, this last pattern means that content is a value equal to "article",
"book" or "chapter". This is illegal to include that after "meta" if
it's an element and, in any case, probably not what you mean. What
about:

content = { article | book | chapter }

???

Hope that helps.

Eric
-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
Upcoming schema tutorial:
 - Philadelphia (7/12/2003)                    http://masl.to/?V28612FC5
Tutoriel XSLT:
 - Paris (25/11/2003)                          http://masl.to/?L2C623FC5
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dkuhlman@cutter.rexx.com Fri Nov 21 07:33:33 2003
Received: from cutter.rexx.com (root@ias-207-167-89-8.icg.znet.net
	[207.167.89.8])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAL0XWkS034094
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 07:33:32 +0700 (ICT)
Received: (from dkuhlman@localhost)
	by cutter.rexx.com (8.11.1/8.9.3) id hAL0XQl56335
	for relaxng-user@relaxng.org; Thu, 20 Nov 2003 16:33:26 -0800 (PST)
	(envelope-from dkuhlman)
Date: Thu, 20 Nov 2003 16:33:26 -0800
From: Dave Kuhlman <dkuhlman@cutter.rexx.com>
To: relaxng-user@relaxng.org
Message-ID: <20031120163326.A56261@cutter.rexx.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.2.4i
Subject: [relaxng-user] Python parser for RELAX NG compact syntax
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 00:33:34 -0000

I've implemented (most of) a parser in Python for the RELAX NG
compact syntax.

It's written in Python and uses PLY (yet another implementation of
lex and yacc for Python).

The parser produces a parse tree whose nodes are instances of a class
ASTNode, which is defined in the parser module.

It's recognizes most but *not* all of the compact syntax, but,
hopefully, recognizes enough to make it useful, and can be
extended when necessary.

You can find documentation on the parser here:

    http://www.rexx.com/~dkuhlman/relaxngcompact.html

And, you can find a distribution file here:

    http://www.rexx.com/~dkuhlman/relaxngcompact-1.0a.tar.gz

If I can be of help with this, please let me know.

Dave

-- 
Dave Kuhlman
dkuhlman@rexx.com
http://www.rexx.com/~dkuhlman

From bob.ducharme@lexisnexis.com Fri Nov 21 22:45:20 2003
Received: from mx02.lexis-nexis.com (mx02.lexis-nexis.com [207.25.178.45])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hALFjJoJ053899
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 22:45:19 +0700 (ICT)
Received: from mailgate2.lexis-nexis.com (mailgate2.lexis-nexis.com
	[138.12.44.45])
	by mx02.lexis-nexis.com (8.12.10/8.12.10) with ESMTP id hALFdFvC014847
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 10:39:15 -0500
Received: from LNXDAYEXCH06.lexis-nexis.com (lnxdayexch06.lexis-nexis.com
	[138.12.12.59])
	by mailgate2.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id
	hALFiwd7007270
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 10:45:07 -0500
Received: by lnxdayexch06.lexis-nexis.com with Internet Mail Service
	(5.5.2657.72) id <W05LR8P8>; Fri, 21 Nov 2003 10:44:58 -0500
Message-ID: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52F0F@lnxdayexch06.lexis-nexis.com>
From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
To: relaxng-user@relaxng.org
Date: Fri, 21 Nov 2003 10:44:55 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: text/plain;
	charset="iso-8859-1"
X-Scanned-By: MIMEDefang 2.38
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
Subject: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 15:45:22 -0000

I've written a paper for XML 2003 on a technique for dual use of DTDs and
RNG schemas suggested by James on the nxml list
(http://groups.yahoo.com/group/emacs-nxml-mode/message/129). I've posted the
paper at http://www.snee.com/bob/temp/06-04-05.html, and would love to hear
suggestions from anyone who has a chance to read it in the next few days. 

One question I have in particular is whether "add-on schema," as I've termed
it, is the most appropriate name for a schema that specifies constraints to
be used in conjunction with a DTD, or if another term makes more sense, such
as "auxiliary schema." 

Writing this was a bit of a milestone for me: I downloaded the conference
paper DTD, converted it to RNC, and wrote the paper using Emacs and nxml
without ever looking at the DTD or RNC files. (The acronym "RNC," by the
way, has odd associations for people in the United States, because it
usually refers to the "Republican National Committee," the group that runs
George Bush's political party.)

thanks,

Bob DuCharme          www.snee.com/bob           <bob@  
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii

From Kohsuke.Kawaguchi@Sun.COM Fri Nov 21 23:47:07 2003
Received: from brmea-mail-4.sun.com (brmea-mail-4.Sun.COM [192.18.98.36])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hALGl7F6064900
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 23:47:07 +0700 (ICT)
Received: from esunmail ([129.147.156.34])
	by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id hALGl6cm006521
	for <relaxng-user@relaxng.org>; Fri, 21 Nov 2003 09:47:06 -0700 (MST)
Received: from xpa-fe1 (esunmail [129.147.156.34]) by edgemail1.Central.Sun.COM
	(iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep  8 2003))
	with ESMTP id <0HOP000VONYHU2@edgemail1.Central.Sun.COM> for
	relaxng-user@relaxng.org; Fri, 21 Nov 2003 09:47:06 -0700 (MST)
Received: from [192.168.1.23] ([129.152.201.157])
	by mail.sun.net (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8
	2003)) with ESMTP id <0HOP007I0NYG3W@mail.sun.net> for
	relaxng-user@relaxng.org; Fri, 21 Nov 2003 09:47:05 -0700 (MST)
Date: Fri, 21 Nov 2003 08:47:05 -0800
From: kk@kohsuke.org
Subject: Re: [relaxng-user] combining schemas
In-reply-to: <1069368413.21694.83.camel@delleric>
To: relaxng-user@relaxng.org
Message-id: <20031121084702.DBB6.KK@kohsuke.org>
MIME-version: 1.0
X-Mailer: Becky! ver. 2.06.02
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
References: <A8B783F2-1BA8-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069368413.21694.83.camel@delleric>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 21 Nov 2003 16:47:08 -0000


> BTW, this last pattern means that content is a value equal to "article",
> "book" or "chapter". This is illegal to include that after "meta" if
> it's an element

Why?

> and, in any case, probably not what you mean. What about:


regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi@sun.com


From jjc@jclark.com Sat Nov 22 08:50:18 2003
Received: from server.bkk.thaiopensource.com ([203.130.150.186])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAM1oF69047591
	for <relaxng-user@relaxng.org>; Sat, 22 Nov 2003 08:50:17 +0700 (ICT)
Received: from [192.168.0.148] ([203.130.150.187])
	by server.bkk.thaiopensource.com (8.11.6/8.11.6) with ESMTP id
	hAM1nu518424; Sat, 22 Nov 2003 08:49:58 +0700
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX
	NG schemas" paper
From: James Clark <jjc@jclark.com>
To: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
In-Reply-To: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52F0F@lnxdayexch06.lexis-nexis.com>
References: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52F0F@lnxdayexch06.lexis-nexis.com>
Content-Type: text/plain
Message-Id: <1069465573.1410.36.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Sat, 22 Nov 2003 08:46:13 +0700
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Nov 2003 01:50:19 -0000

On Fri, 2003-11-21 at 22:44, DuCharme, Bob (LNG-CHO) wrote:

> I've written a paper for XML 2003 on a technique for dual use of DTDs and
> RNG schemas suggested by James on the nxml list
> (http://groups.yahoo.com/group/emacs-nxml-mode/message/129). I've posted the
> paper at http://www.snee.com/bob/temp/06-04-05.html, and would love to hear
> suggestions from anyone who has a chance to read it in the next few days. 

A few comments:

1. You suggest doing RNG validation in addition to DTD validation. So
long as you do RNG DTD-compatibility checking, RNG validation alone is
enough (although I can well imaging non-technical reasons for doing DTD
validation).

2. With DTD validation, you can only check that the document is valid
with respect to the DTD that the document specifies.  In many cases,
even in a DTD-based environment, there is a requirement that the
document use a specific DTD, but DTD validation provides no way to
enforce this.  RNG validation helps with this too.

3. Apropos using these techniques with W3C XML Schema, if you use Trang
to convert from DTD to XSD, then your parameter entities will be
preserved, at least to some degree.

4. You say:

> To do this, however, the conversion utility parsing the DTD must know
> whether each parameter entity declares a piece of a content model or
> an attribute list, but to a DTD parser they're all just strings.

Although in an a DTD to RNG conversion Trang converts parameter entities
only to definitions, it can't do this unless it can figure out what kind
of thing the parameter entity is representing.  This is what makes
preserving parameter entities so hard: to a DTD parser they are all
indeed just strings, but you need to know more than this to do any kind
of conversion, whether to RNG or XSD. (What Trang does approximately is
to expand the parameter entities, keeping track of which parameter
entities each character in the result comes from, then parse, then
unexpand those parameter entities that correspond consistently to some
syntactic unit.)

James


From cowan@mercury.ccil.org Sat Nov 22 10:00:43 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAM30gXZ056777
	for <relaxng-user@relaxng.org>; Sat, 22 Nov 2003 10:00:42 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1ANO0d-0001S8-00; Fri, 21 Nov 2003 22:00:31 -0500
Date: Fri, 21 Nov 2003 22:00:31 -0500
To: James Clark <jjc@jclark.com>
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
Message-ID: <20031122030031.GE26171@mercury.ccil.org>
References: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52F0F@lnxdayexch06.lexis-nexis.com>
	<1069465573.1410.36.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1069465573.1410.36.camel@rambutan.bkk.thaiopensource.com>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Nov 2003 03:00:43 -0000

James Clark scripsit:

> 1. You suggest doing RNG validation in addition to DTD validation. So
> long as you do RNG DTD-compatibility checking, RNG validation alone is
> enough (although I can well imaging non-technical reasons for doing DTD
> validation).
> 
> 2. With DTD validation, you can only check that the document is valid
> with respect to the DTD that the document specifies.  In many cases,
> even in a DTD-based environment, there is a requirement that the
> document use a specific DTD, but DTD validation provides no way to
> enforce this.  RNG validation helps with this too.

Since DTDs can be used as validation schemas, the true division is between
an incorporated DTD and a validation schema rather than between DTD
validation and RNG/WXS validation.

-- 
Is a chair finely made tragic or comic? Is the          John Cowan
portrait of Mona Lisa good if I desire to see           jcowan@reutershealth.com
it? Is the bust of Sir Philip Crampton lyrical,         www.ccil.org/~cowan
epical or dramatic?  If a man hacking in fury           www.reutershealth.com
at a block of wood make there an image of a cow,
is that image a work of art? If not, why not?               --Stephen Dedalus

From mamiano@nc.rr.com Sat Nov 22 21:05:54 2003
Received: from ms-smtp-03-eri0.southeast.rr.com
	(ms-smtp-03-lbl.southeast.rr.com [24.25.9.102])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAME5sdS033923
	for <relaxng-user@relaxng.org>; Sat, 22 Nov 2003 21:05:54 +0700 (ICT)
Received: from nc.rr.com (rdu26-47-081.nc.rr.com [66.26.47.81])
	by ms-smtp-03-eri0.southeast.rr.com (8.12.10/8.12.7) with ESMTP id
	hAME5rFm001267
	for <relaxng-user@relaxng.org>; Sat, 22 Nov 2003 09:05:54 -0500 (EST)
Message-ID: <3FBF6D2A.1030807@nc.rr.com>
Date: Sat, 22 Nov 2003 09:05:30 -0500
From: Mitch Amiano <mamiano@nc.rr.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
	rv:1.4.1) Gecko/20031008
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
References: <200311220500.hAM504ee071496@thaiopensource.com>
In-Reply-To: <200311220500.hAM504ee071496@thaiopensource.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Subject: [relaxng-user] Re: Converting DTDs (and DTD developers) to RELAX NG
	schemas
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: mamiano@nc.rr.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 22 Nov 2003 14:05:56 -0000

"Auxiliary" is suggestive of a subordinated role. Ditto for "add-on", which sounds like a band-aid(tm). "Adjunct" sounds a litle more academic, but is also a discounting term. You might consider the goals your technique addresses... the value of the role proposed for the relaxng schemas in the use-case. 

How about "migration schema" (schemas used in migrating from one validation workflow to another), 
"refinement schema" (schemas which refine the precision with which an existing workflow can perform validation),
or "articulation schema" (schemas which provide controlled jointing between other schemas, addressing different validation goals).

relaxng-user-request@relaxng.org wrote:
 > Date: Fri, 21 Nov 2003 10:44:55 -0500
> From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
> Subject: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX
> 	NG	schemas" paper
> To: relaxng-user@relaxng.org
> I've written a paper 
/snip/
> One question I have in particular is whether "add-on schema," as I've termed
> it, is the most appropriate name for a schema that specifies constraints to
> be used in conjunction with a DTD, or if another term makes more sense, such
> as "auxiliary schema." 



From bdarcus@fastmail.fm Sun Nov 23 23:42:27 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hANGgRiE004142
	for <relaxng-user@relaxng.org>; Sun, 23 Nov 2003 23:42:27 +0700 (ICT)
X-Sasl-enc: s5/75EKMrBB1PmFNHNwWJw 1069605739
Received: from [134.53.28.173] (u173.s28.muohio.edu [134.53.28.173])
	by mail.messagingengine.com (Postfix) with ESMTP id 25F1243DA93
	for <relaxng-user@relaxng.org>; Sun, 23 Nov 2003 11:42:19 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
In-Reply-To: <1069368413.21694.83.camel@delleric>
References: <A8B783F2-1BA8-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069368413.21694.83.camel@delleric>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <113E7B89-1DD4-11D8-869B-000A95B10832@fastmail.fm>
Content-Transfer-Encoding: 7bit
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] combining schemas
Date: Sun, 23 Nov 2003 11:42:46 -0500
To: relaxng-user@relaxng.org
X-Mailer: Apple Mail (2.606)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 23 Nov 2003 16:42:28 -0000


On Nov 20, 2003, at 5:46 PM, Eric van der Vlist wrote:

>> What am I doing wrong??
>
> If you include the schema for docbook, you need to either redefine the
> start pattern defined in the schema for docbook or combine its content
> with a new one.

Thanks for this Eric.  I was able to get it working ultimately.

I'm now stuck with the same duplicate start problem in another 
circumstance.

The mods schema has an extension element that allows one to embed 
content from other namespaced schema.  I have create simple schema 
called bibio-notes, which I want to use to add marked up annotations to 
the record.

I assumed the following would work, but I am getting the duplicate 
start error from nxml mode.  The start pattern for mods is:

start = ModsSchema.

Here's my schema:

include "biblio-notes.rnc" { start = ModsSchema }

include "mods.rnc" {
    extension = element extension { biblio-notes }*
}

Once again: what am I missing?  Also, do I need to do something special 
to get the namespace for biblio-notes attached to the extension element 
in mods for validation?

Bruce


From David.Pawson@rnib.org.uk Mon Nov 24 21:00:44 2003
Received: from maggotts.rnib.org.uk (maggotts.rnib.org.uk [194.128.16.48])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAOE0hXu059701
	for <relaxng-user@relaxng.org>; Mon, 24 Nov 2003 21:00:44 +0700 (ICT)
Received: from pboroweb.rnib.org.uk (pboroweb.rnib.org.uk [194.128.16.17])
	by maggotts.rnib.org.uk (8.11.6/8.11.6) with ESMTP id hAOE0M003822
	for <relaxng-user@relaxng.org>; Mon, 24 Nov 2003 14:00:27 GMT
Received: by pboroweb.rnib.org.uk with Internet Mail Service (5.5.2656.59)
	id <WT087N31>; Mon, 24 Nov 2003 14:00:17 -0000
Message-ID: <9B66BBD37D5DD411B8CE00508B69700F049E1FFF@pborolocal.rnib.org.uk>
From: David.Pawson@rnib.org.uk
To: relaxng-user@relaxng.org
Date: Mon, 24 Nov 2003 14:00:16 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="utf-8"
Subject: [relaxng-user] Pattern.
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Nov 2003 14:00:44 -0000

<languageCode lang="en-us">

I'm trying to find a pattern for the en-us attribute.

If I pull the list of langs from iso 639 and 3166,
How can I specify a pattern using

<define name="PrimaryLang">
  <choice>
    <value>en</value>
    <value>fr</value>
     ...
  </choice>
</define>

ditto for country codes.

I.e. what is the contents of
<element name="languageCode">
<attribute name="lang">
  ????
</attribute>

Trying

<define name="LanguageCode">
  <element name="languageCode">
    <attribute name="lang">
      <list>
	<ref name="PrimaryLang"/>
	<data type="string">
	  <param name="pattern">-</param>
	</data>
	<ref name="LangSubGroup"/>
      </list>
    </attribute>
    <empty/>
  </element>
</define>

Seems wrong via jing/nxml-mode

Regards DaveP.

**** snip here *****

- 
DISCLAIMER: 

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged. If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system. 

RNIB endeavours to ensure that emails and any attachments generated by 
its staff are free from viruses or other contaminants. However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments. 

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent 
those of RNIB. 

RNIB Registered Charity Number: 226227 

Website: http://www.rnib.org.uk 

From bob.ducharme@lexisnexis.com Tue Nov 25 01:24:13 2003
Received: from mx02.lexis-nexis.com (mx02.lexis-nexis.com [207.25.178.45])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAOIODbh003203
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 01:24:13 +0700 (ICT)
Received: from mailgate2.lexis-nexis.com (mailgate2.lexis-nexis.com
	[138.12.44.45])
	by mx02.lexis-nexis.com (8.12.10/8.12.10) with ESMTP id hAOIHDvC019160; 
	Mon, 24 Nov 2003 13:17:14 -0500
Received: from LNXDAYEXCH06.lexis-nexis.com (lnxdayexch06.lexis-nexis.com
	[138.12.12.59])
	by mailgate2.lexis-nexis.com (8.12.9/8.12.9) with ESMTP id
	hAOINtd7007871; Mon, 24 Nov 2003 13:23:59 -0500
Received: by lnxdayexch06.lexis-nexis.com with Internet Mail Service
	(5.5.2657.72) id <W05LSDRW>; Mon, 24 Nov 2003 13:23:55 -0500
Message-ID: <FEF4858E8AB32D4EAC2CF2A7D85386EBE52F1F@lnxdayexch06.lexis-nexis.com>
From: "DuCharme, Bob (LNG-CHO)" <bob.ducharme@lexisnexis.com>
To: "'James Clark'" <jjc@jclark.com>
Subject: RE: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX
	NG schemas" paper
Date: Mon, 24 Nov 2003 13:23:54 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
Content-Type: text/plain;
	charset="iso-8859-1"
X-Scanned-By: MIMEDefang 2.38
X-Scanned-By: MIMEDefang 2.33 (www . roaringpenguin . com / mimedefang)
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Nov 2003 18:24:17 -0000

James,

Thanks very much for the review. (And thanks to everyone else who looked it
over.)

>1. You suggest doing RNG validation in addition to DTD validation. So
>long as you do RNG DTD-compatibility checking, RNG validation alone is
>enough (although I can well imaging non-technical reasons for doing DTD
>validation).

Thanks, good point. I was thinking about the continued use of the DTD as
before, which usually means in conjunction with some app that uses DTDs for
validation and more, such as an editor. I will make this clearer.

>2. With DTD validation, you can only check that the document is valid
>with respect to the DTD that the document specifies.  In many cases,
>even in a DTD-based environment, there is a requirement that the
>document use a specific DTD, but DTD validation provides no way to
>enforce this.  RNG validation helps with this too.

I'm not sure what you mean here--I thought part of the RNG philosophy was to
avoid hard-coding a link between a document and a schema. Can you give me an
example? 

>3. Apropos using these techniques with W3C XML Schema, if you use Trang
>to convert from DTD to XSD, then your parameter entities will be
>preserved, at least to some degree.

I see now that when converting the first example in my article, it does
declare and reference a name.content type, but not a quantity.type one. 

>(What Trang does approximately is
>to expand the parameter entities, keeping track of which parameter
>entities each character in the result comes from, then parse, then
>unexpand those parameter entities that correspond consistently to some
>syntactic unit.)

Well, we certainly have to thank you for going to the trouble, when
according to my research no one else really has!

Bob

From cowan@mercury.ccil.org Tue Nov 25 01:54:41 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAOIsfBF008346
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 01:54:41 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOLkh-00007S-00; Mon, 24 Nov 2003 13:48:03 -0500
Date: Mon, 24 Nov 2003 13:48:03 -0500
To: David.Pawson@rnib.org.uk
Subject: Re: [relaxng-user] Pattern.
Message-ID: <20031124184803.GG28930@mercury.ccil.org>
References: <9B66BBD37D5DD411B8CE00508B69700F049E1FFF@pborolocal.rnib.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9B66BBD37D5DD411B8CE00508B69700F049E1FFF@pborolocal.rnib.org.uk>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 24 Nov 2003 18:54:43 -0000

David.Pawson@rnib.org.uk scripsit:

> I'm trying to find a pattern for the en-us attribute.

What you are trying to do is not possible.
You need to use a WXS pattern instead.

> <define name="LanguageCode">
>   <element name="languageCode">
>     <attribute name="lang">
>       <list>
> 	<ref name="PrimaryLang"/>
> 	<data type="string">
> 	  <param name="pattern">-</param>
> 	</data>
> 	<ref name="LangSubGroup"/>
>       </list>
>     </attribute>
>     <empty/>
>   </element>
> </define>

The list pattern can only cope with whitespace-separated items, not with
arbitrary concatenations.

In any case, the RFC 3066 language codes are an open set.  You should
either accept any arbitrary string of ASCII alphas, digits, and hyphen
(you can rule out initial, final, and consecutive hyphens if you like),
or else a fixed set of values that your application understands.

-- 
One art / There is                      John Cowan <jcowan@reutershealth.com>
No less / No more                       http://www.reutershealth.com
All things / To do                      http://www.ccil.org/~cowan
With sparks / Galore                     -- Douglas Hofstadter

From David.Pawson@rnib.org.uk Tue Nov 25 15:14:14 2003
Received: from maggotts.rnib.org.uk (maggotts.rnib.org.uk [194.128.16.48])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAP8EDcR025419
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 15:14:14 +0700 (ICT)
Received: from pboroweb.rnib.org.uk (pboroweb.rnib.org.uk [194.128.16.17])
	by maggotts.rnib.org.uk (8.11.6/8.11.6) with ESMTP id hAP8Dq001562
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 08:13:57 GMT
Received: by pboroweb.rnib.org.uk with Internet Mail Service (5.5.2656.59)
	id <WT0874QD>; Tue, 25 Nov 2003 08:13:46 -0000
Message-ID: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
From: David.Pawson@rnib.org.uk
To: relaxng-user@relaxng.org
Subject: RE: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX
	NG schemas" paper
Date: Tue, 25 Nov 2003 08:13:46 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="iso-8859-1"
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 08:14:16 -0000

Bob, I'm being faced in two cases with an XSD | Relax NG as master problem.
I'm convinced its not a technical decision (almost certainly in one case)
but
more of a political one. A perception that the majority are using W3C XSD,
hence we should, or MS use it, it must be right. 

  I recall James spoke at one time of the two schema's together, but I don't

have a url. Has anyone collated a comparison to help people choosing between
the two? What are the objections to having XSD as the master, and using
relax ng as and when via trang? Is that viable?


  regards DaveP.

- 
DISCLAIMER: 

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged. If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system. 

RNIB endeavours to ensure that emails and any attachments generated by 
its staff are free from viruses or other contaminants. However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments. 

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent 
those of RNIB. 

RNIB Registered Charity Number: 226227 

Website: http://www.rnib.org.uk 

From David.Pawson@rnib.org.uk Tue Nov 25 15:17:30 2003
Received: from maggotts.rnib.org.uk (maggotts.rnib.org.uk [194.128.16.48])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAP8HTpo025816
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 15:17:30 +0700 (ICT)
Received: from pboroweb.rnib.org.uk (pboroweb.rnib.org.uk [194.128.16.17])
	by maggotts.rnib.org.uk (8.11.6/8.11.6) with ESMTP id hAP8Gq001640;
	Tue, 25 Nov 2003 08:16:57 GMT
Received: by pboroweb.rnib.org.uk with Internet Mail Service (5.5.2656.59)
	id <WT0874Q4>; Tue, 25 Nov 2003 08:16:46 -0000
Message-ID: <9B66BBD37D5DD411B8CE00508B69700F049E2005@pborolocal.rnib.org.uk>
From: David.Pawson@rnib.org.uk
To: cowan@mercury.ccil.org, relaxng-user@relaxng.org
Subject: RE: [relaxng-user] Pattern.
Date: Tue, 25 Nov 2003 08:16:47 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="iso-8859-1"
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 08:17:30 -0000

 

    -----Original Message-----
    From: John Cowan 

    What you are trying to do is not possible.
    You need to use a WXS pattern instead.
<snip/>
    The list pattern can only cope with whitespace-separated 
    items, not with arbitrary concatenations.
Mmm. OK. Thanks John. That answers a question I had on dates
as dd/mm/yyyy. Worked with spaces, not without.
    
    In any case, the RFC 3066 language codes are an open set.  
    You should either accept any arbitrary string of ASCII 
    alphas, digits, and hyphen (you can rule out initial, 
    final, and consecutive hyphens if you like), or else a 
    fixed set of values that your application understands.

Will do.

Many thanks.

regards DaveP.


- 
DISCLAIMER: 

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged. If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system. 

RNIB endeavours to ensure that emails and any attachments generated by 
its staff are free from viruses or other contaminants. However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments. 

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent 
those of RNIB. 

RNIB Registered Charity Number: 226227 

Website: http://www.rnib.org.uk 

From veillard@redhat.com Tue Nov 25 16:04:41 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAP94fST032150
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 16:04:41 +0700 (ICT)
Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1])
	by devserv.devel.redhat.com (8.12.10/8.12.10) with ESMTP id
	hAP94NDl025279; Tue, 25 Nov 2003 04:04:23 -0500
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.12.10/8.12.10/Submit) id hAP94NmS025277; 
	Tue, 25 Nov 2003 04:04:23 -0500
Date: Tue, 25 Nov 2003 04:04:23 -0500
From: Daniel Veillard <veillard@redhat.com>
To: David.Pawson@rnib.org.uk
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
Message-ID: <20031125090423.GC12979@redhat.com>
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 09:04:41 -0000

On Tue, Nov 25, 2003 at 08:13:46AM -0000, David.Pawson@rnib.org.uk wrote:
> Bob, I'm being faced in two cases with an XSD | Relax NG as master problem.
> I'm convinced its not a technical decision (almost certainly in one case)
> but
> more of a political one. A perception that the majority are using W3C XSD,
> hence we should, or MS use it, it must be right. 
> 
>   I recall James spoke at one time of the two schema's together, but I don't
> 
> have a url.

  Well there is the relatively harsh (but fair at the time) comparison
he posted on the ietf-xml-use mailing list
  http://www.imc.org/ietf-xml-use/mail-archive/msg00217.html

Though the XML Schemas implementation have improved since, still
a lot of the argumentation still makes a lot of sense from a
technical viewpoint IMHO.

> Has anyone collated a comparison to help people choosing between
> the two? What are the objections to having XSD as the master, and using
> relax ng as and when via trang? Is that viable?

  Since it's far far easier to validate the semantic of a Relax-NG
Schemas it seems to me that doing the opposite way (i.e. having
the Relax-NG master and relying on automatic generation for the XSD)
is more likely to garantee the semantic of both schemas,

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From dvd@davidashen.net Tue Nov 25 16:15:16 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAP9FCAS033778
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 16:15:14 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hAP9EO3j007310
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 13:14:24 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hAP9EOvG007309
	for relaxng-user@relaxng.org; Tue, 25 Nov 2003 13:14:24 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311250914.hAP9EOvG007309@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Tue, 25 Nov 2003 13:14:24 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] line terminator in compact syntax
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 09:15:16 -0000

Hi,

do I understand it correctly that while #xA terminates a comment and is a whitespace
in the compact syntax, #xD does not and is not?

David Tolpin

From David.Pawson@rnib.org.uk Tue Nov 25 17:05:42 2003
Received: from maggotts.rnib.org.uk (maggotts.rnib.org.uk [194.128.16.48])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPA5gRb040552
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 17:05:42 +0700 (ICT)
Received: from pboroweb.rnib.org.uk (pboroweb.rnib.org.uk [194.128.16.17])
	by maggotts.rnib.org.uk (8.11.6/8.11.6) with ESMTP id hAPA4v007480;
	Tue, 25 Nov 2003 10:05:03 GMT
Received: by pboroweb.rnib.org.uk with Internet Mail Service (5.5.2656.59)
	id <WT087WCA>; Tue, 25 Nov 2003 10:04:52 -0000
Message-ID: <9B66BBD37D5DD411B8CE00508B69700F049E200A@pborolocal.rnib.org.uk>
From: David.Pawson@rnib.org.uk
To: veillard@redhat.com, relaxng-user@relaxng.org
Subject: RE: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX
	NG schemas" paper
Date: Tue, 25 Nov 2003 10:04:51 -0000
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2656.59)
Content-Type: text/plain;
	charset="iso-8859-1"
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 10:05:43 -0000

Daniel said:
      Well there is the relatively harsh (but fair at the time) 
    comparison he posted on the ietf-xml-use mailing list
      http://www.imc.org/ietf-xml-use/mail-archive/msg00217.html

thanks Daniel.
  http://lists.w3.org/Archives/Public/www-tag/2002Jun/0119.html
also.
    

      Since it's far far easier to validate the semantic of a 
    Relax-NG Schemas it seems to me that doing the opposite way 
    (i.e. having the Relax-NG master and relying on automatic 
    generation for the XSD) is more likely to garantee the 
    semantic of both schemas,
I'd agree. I'm less sure that I can persuade a bean counter who has
heard of the words though :-)
  Remember that phrase, you never get the sack for buying big blue?

regards DaveP

- 
DISCLAIMER: 

NOTICE: The information contained in this email and any attachments is 
confidential and may be privileged. If you are not the intended 
recipient you should not use, disclose, distribute or copy any of the 
content of it or of any attachment; you are requested to notify the 
sender immediately of your receipt of the email and then to delete it 
and any attachments from your system. 

RNIB endeavours to ensure that emails and any attachments generated by 
its staff are free from viruses or other contaminants. However, it 
cannot accept any responsibility for any  such which are transmitted.
We therefore recommend you scan all attachments. 

Please note that the statements and views expressed in this email and 
any attachments are those of the author and do not necessarily represent 
those of RNIB. 

RNIB Registered Charity Number: 226227 

Website: http://www.rnib.org.uk 

From davidc@nag.co.uk Tue Nov 25 17:51:57 2003
Received: from mail35.messagelabs.com (mail35.messagelabs.com [62.231.131.195])
	by thaiopensource.com (8.12.10/8.11.2) with SMTP id hAPApu7c046302
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 17:51:57 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-11.tower-35.messagelabs.com!1069757514!2039529
X-StarScan-Version: 5.1.13; banners=nag.co.uk,-,-
Received: (qmail 9510 invoked from network); 25 Nov 2003 10:51:54 -0000
Received: from smtp-6.star.net.uk (212.125.75.75)
	by server-11.tower-35.messagelabs.com with SMTP;
	25 Nov 2003 10:51:54 -0000
Received: (qmail 18891 invoked from network); 25 Nov 2003 10:51:54 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-6.star.net.uk with SMTP; 25 Nov 2003 10:51:54 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id KAA23873
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 10:51:47 GMT
Date: Tue, 25 Nov 2003 10:49:38 GMT
Message-Id: <200311251049.KAA21006@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id KAA21006;
	Tue, 25 Nov 2003 10:49:38 GMT
From: David Carlisle <davidc@nag.co.uk>
To: relaxng-user@relaxng.org
In-reply-to: <20031125090423.GC12979@redhat.com> (message from Daniel Veillard
	on Tue, 25 Nov 2003 04:04:23 -0500)
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
	<20031125090423.GC12979@redhat.com>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 10:51:58 -0000

Daniel


  Since it's far far easier to validate the semantic of a Relax-NG
  Schemas it seems to me that doing the opposite way (i.e. having
  the Relax-NG master and relying on automatic generation for the XSD)
  is more likely to garantee the semantic of both schemas,


That's what we're doing in the OpenMath 2 specification
(http://www.openmath.org/standard/om20)

Writing the schema (in rnc) and deriving rng, xsd and dtd as needed.

There is though a question that has come up with regards choosing a
normative format.

In practice the schema is authored in the compact syntax. I have been
arguing that that is the one that should be normative (and in the body
of the OpenMath specification) as it is
a) readable and
b) the actual source.
However some have argued that the RNG XML syntax should be the normative
version as it is more standard (in particular further down the ISO
standardisation tracks).

What is the current feeling amongst Relax MG practitioners, is it OK to use
the compact syntax as a normative specification of a grammar?

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From cowan@mercury.ccil.org Tue Nov 25 19:25:54 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPCPsOL057545
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:25:54 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOcGO-0005Ot-00; Tue, 25 Nov 2003 07:25:52 -0500
Date: Tue, 25 Nov 2003 07:25:52 -0500
To: David Carlisle <davidc@nag.co.uk>
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
Message-ID: <20031125122552.GB18123@mercury.ccil.org>
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
	<20031125090423.GC12979@redhat.com>
	<200311251049.KAA21006@penguin.nag.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200311251049.KAA21006@penguin.nag.co.uk>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 12:25:54 -0000

David Carlisle scripsit:

> What is the current feeling amongst Relax MG practitioners, is it OK to use
> the compact syntax as a normative specification of a grammar?

Absolutely.  What is more, since you actually use it to write the grammar,
it should be normative for that reason, so that if there is any (all too
easy!) screwup in keeping the XML version up to date, it won't bite you
in the ass.

FWIW, the XHTML 2 draft makes the RNG, WXS, and DTD versions all normative,
though currently only the RNG is supplied.

-- 
John Cowan  jcowan@reutershealth.com  www.reutershealth.com  www.ccil.org/~cowan
Consider the matter of Analytic Philosophy.  Dennett and Bennett are well-known.
Dennett rarely or never cites Bennett, so Bennett rarely or never cites Dennett.
There is also one Dummett.  By their works shall ye know them.  However, just as
no trinities have fourth persons (Zeppo Marx notwithstanding), Bummett is hardly
known by his works.  Indeed, Bummett does not exist.  It is part of the function
of this and other e-mail messages, therefore, to do what they can to create him.

From cowan@mercury.ccil.org Tue Nov 25 19:28:41 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPCSeZR057846
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:28:41 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOcCk-0005KB-00; Tue, 25 Nov 2003 07:22:06 -0500
Date: Tue, 25 Nov 2003 07:22:06 -0500
To: David.Pawson@rnib.org.uk
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
Message-ID: <20031125122206.GA18123@mercury.ccil.org>
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 12:28:41 -0000

David.Pawson@rnib.org.uk scripsit:

> What are the objections to having XSD as the master, and using
> relax ng as and when via trang? Is that viable?

The chief objection is that Trang can't do that: it doesn't accept
XML Schemas as input.

-- 
If you understand,                      John Cowan
   things are just as they are;         http://www.ccil.org/~cowan
if you do not understand,               http://www.reutershealth.com
   things are just as they are.         jcowan@reutershealth.com

From tbray@textuality.com Tue Nov 25 19:29:13 2003
Received: from mail.dev.antarcti.ca (gt.antarcti.ca [209.17.183.233])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPCTCQe057934
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:29:13 +0700 (ICT)
Received: from [IPv6:::1] (dev1.dev.antarcti.ca [10.1.1.8])
	by mail.dev.antarcti.ca (Postfix) with ESMTP
	id B63B01033B; Tue, 25 Nov 2003 04:25:15 -0800 (PST)
In-Reply-To: <200311251049.KAA21006@penguin.nag.co.uk>
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
	<20031125090423.GC12979@redhat.com>
	<200311251049.KAA21006@penguin.nag.co.uk>
Mime-Version: 1.0 (Apple Message framework v606)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <6C4BA470-1F42-11D8-BE4C-000A95A51C9E@textuality.com>
Content-Transfer-Encoding: 7bit
From: Tim Bray <tbray@textuality.com>
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
Date: Tue, 25 Nov 2003 04:25:15 -0800
To: David Carlisle <davidc@nag.co.uk>
X-Mailer: Apple Mail (2.606)
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 12:29:13 -0000

On Nov 25, 2003, at 2:49 AM, David Carlisle wrote:

> What is the current feeling amongst Relax MG practitioners, is it OK 
> to use
> the compact syntax as a normative specification of a grammar?

For Atom, I think we're going to use RNC as the "official" schema; we 
may end up also having an official .xsd because the trang-generated 
version is kinda hideous.  Nothing wrong with trang, just the usual XSD 
broken-ness. -Tim


From davidc@nag.co.uk Tue Nov 25 19:39:50 2003
Received: from mail35.messagelabs.com (mail35.messagelabs.com [62.231.131.195])
	by thaiopensource.com (8.12.10/8.11.2) with SMTP id hAPCdmgj059116
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:39:49 +0700 (ICT)
X-VirusChecked: Checked
X-Env-Sender: davidc@nag.co.uk
X-Msg-Ref: server-11.tower-35.messagelabs.com!1069763980!2045050
X-StarScan-Version: 5.1.13; banners=nag.co.uk,-,-
Received: (qmail 10344 invoked from network); 25 Nov 2003 12:39:40 -0000
Received: from smtp-3.star.net.uk (212.125.75.72)
	by server-11.tower-35.messagelabs.com with SMTP;
	25 Nov 2003 12:39:40 -0000
Received: (qmail 19712 invoked from network); 25 Nov 2003 12:39:40 -0000
Received: from nagmx1.nag.co.uk (HELO nag.co.uk) (62.231.145.242)
	by smtp-3.star.net.uk with SMTP; 25 Nov 2003 12:39:40 -0000
Received: from penguin.nag.co.uk (IDENT:root@penguin.nag.co.uk
	[192.156.217.14]) by nag.co.uk (8.9.3/8.9.3) with ESMTP id MAA26264
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 12:39:32 GMT
Date: Tue, 25 Nov 2003 12:36:48 GMT
Message-Id: <200311251236.MAA22114@penguin.nag.co.uk>
Received: by penguin.nag.co.uk (8.9.3) id MAA22114;
	Tue, 25 Nov 2003 12:36:48 GMT
From: David Carlisle <davidc@nag.co.uk>
To: relaxng-user@relaxng.org
In-reply-to: <20031125122206.GA18123@mercury.ccil.org> (message from John
	Cowan on Tue, 25 Nov 2003 07:22:06 -0500)
Subject: Re: [relaxng-user] "Converting DTDs (and DTD developers) to RELAX NG
	schemas" paper
References: <9B66BBD37D5DD411B8CE00508B69700F049E2004@pborolocal.rnib.org.uk>
	<20031125122206.GA18123@mercury.ccil.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 12:39:50 -0000



>> What are the objections to having XSD as the master, and using
>> relax ng as and when via trang? Is that viable?
>
>The chief objection is that Trang can't do that: it doesn't accept
>XML Schemas as input.

The other objection, even if trang (or some other system) could read
xsd, is that if xsd is the master then can't express many of the
constraints that you want to express. Especially (in my case)
constraints on attributes where XSD is no better than DTD, just harder
to read, but Relax NG can constrain attributes in pretty much the same
way as elements.

David



________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

From bdarcus@fastmail.fm Tue Nov 25 22:49:13 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPFnC1V087355
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 22:49:13 +0700 (ICT)
X-Sasl-enc: k5xlBQyVW5TJCHR38+QcIQ 1069775346
Received: from fastmail.fm (darcusb.geo.muohio.edu [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id B081F442A8C
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 10:49:05 -0500 (EST)
Date: Tue, 25 Nov 2003 10:49:03 -0500
Subject: Re: [relaxng-user] combining schemas
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
In-Reply-To: <113E7B89-1DD4-11D8-869B-000A95B10832@fastmail.fm>
Message-Id: <E49C3864-1F5E-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 15:49:17 -0000


Sorry to post this again, but I really need an answer to this question, 
and the documentation I've found isn't helping me (more a function of 
my limitations than that of the documentation I'm sure!).  Anyone?

On Nov 20, 2003, at 5:46 PM, Eric van der Vlist wrote:

>> What am I doing wrong??
>
> If you include the schema for docbook, you need to either redefine the
> start pattern defined in the schema for docbook or combine its content
> with a new one.

Thanks for this Eric.  I was able to get it working ultimately.

I'm now stuck with the same duplicate start problem in another 
circumstance.

The mods schema has an extension element that allows one to embed 
content from other namespaced schema.  I have create simple schema 
called bibio-notes, which I want to use to add marked up annotations to 
the record.

I assumed the following would work, but I am getting the duplicate 
start error from nxml mode.  The start pattern for mods is:

start = ModsSchema.

Here's my schema:

===============================

include "biblio-notes.rnc" { start = ModsSchema }

include "mods.rnc" {
    extension = element extension { biblio-notes }*
}

===============================

Once again: what am I missing?

Also, do I need to do something special to get the namespace for 
biblio-notes attached to the extension element in mods for validation?  
In other words, a simple instance would look like:

<mods xmlns="http://www.loc.gov/mods/v3">
	<name/>
	<titleInfo/>
	<originInfo/>
	<extension xmlns:bn="http://www.whatever.com/biblio-notes">
		<bn:notes>
			<bn:para>content wrapped in the foreign schema tags</bn:para>
		</bn:notes>
	</extension>
</mods>

Bruce


From cowan@mercury.ccil.org Tue Nov 25 23:11:26 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPGBQKk091734
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 23:11:26 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOfmb-0004EE-00; Tue, 25 Nov 2003 11:11:21 -0500
Date: Tue, 25 Nov 2003 11:11:14 -0500
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] combining schemas
Message-ID: <20031125161111.GC10250@mercury.ccil.org>
References: <113E7B89-1DD4-11D8-869B-000A95B10832@fastmail.fm>
	<E49C3864-1F5E-11D8-BDCA-000A959F0E52@fastmail.fm>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <E49C3864-1F5E-11D8-BDCA-000A959F0E52@fastmail.fm>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 16:11:26 -0000

Bruce D'Arcus scripsit:

> Once again: what am I missing?

Without all your schemas, there's no hope of figuring it out.

-- 
John Cowan <jcowan@reutershealth.com>     http://www.reutershealth.com
"But no living man am I!  You look upon a woman.  Eowyn I am, Eomund's daughter.
You stand between me and my lord and kin.  Begone, if you be not deathless.
For living or dark undead, I will smite you if you touch him."

From bdarcus@fastmail.fm Tue Nov 25 23:22:19 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPGMJOj093761
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 23:22:19 +0700 (ICT)
X-Sasl-enc: xru7dOQkm6/h+hq74QqSbg 1069777337
Received: from fastmail.fm (darcusb.geo.muohio.edu [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id B886343E433
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 11:22:16 -0500 (EST)
Date: Tue, 25 Nov 2003 11:22:13 -0500
Subject: Re: [relaxng-user] combining schemas
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
In-Reply-To: <20031125161111.GC10250@mercury.ccil.org>
Message-Id: <8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 16:22:20 -0000


On Tuesday, November 25, 2003, at 11:11  AM, John Cowan wrote:

> Without all your schemas, there's no hope of figuring it out.

Ok, I've placed them here:

http://www.users.muohio.edu/darcusb/files/biblio-notes.rnc
http://www.users.muohio.edu/darcusb/files/mods3.rnc

The latter schema was converted from XML Schema* with the Sun 
conversion tool.  I had to tweak the resulting RNG schema a bit to get 
it to work.

Here's the current combined-schema-that-doesn't-work, which I am 
calling mods-bn.rnc:

===============================

include "biblio-notes.rnc" { start = ModsSchema }

include "mods.rnc" {
    extension = element extension { biblio-notes }*
}

===============================

Thanks,
Bruce

* Original schema is at 
http://www.loc.gov/standards/mods/v3/mods-3-0-draft-oct-9.xsd


From vdv@dyomedea.com Tue Nov 25 23:29:02 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPGT1gf094783
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 23:29:01 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP
	id B6000BC52; Tue, 25 Nov 2003 17:28:31 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
In-Reply-To: <E49C3864-1F5E-11D8-BDCA-000A959F0E52@fastmail.fm>
References: <E49C3864-1F5E-11D8-BDCA-000A959F0E52@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069777739.1108.169.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 25 Nov 2003 17:28:59 +0100
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 16:29:02 -0000

On Tue, 2003-11-25 at 16:49, Bruce D'Arcus wrote:
> Sorry to post this again, but I really need an answer to this question, 
> and the documentation I've found isn't helping me (more a function of 
> my limitations than that of the documentation I'm sure!).  Anyone?

Yep. Sorry for the delay, but I am really overloaded...
> 
> On Nov 20, 2003, at 5:46 PM, Eric van der Vlist wrote:
> 
> >> What am I doing wrong??
> >
> > If you include the schema for docbook, you need to either redefine the
> > start pattern defined in the schema for docbook or combine its content
> > with a new one.
> 
> Thanks for this Eric.  I was able to get it working ultimately.
> 
> I'm now stuck with the same duplicate start problem in another 
> circumstance.
> 
> The mods schema has an extension element that allows one to embed 
> content from other namespaced schema.  I have create simple schema 
> called bibio-notes, which I want to use to add marked up annotations to 
> the record.
> 
> I assumed the following would work, but I am getting the duplicate 
> start error from nxml mode.  The start pattern for mods is:
> 
> start = ModsSchema.
> 
> Here's my schema:
> 
> ===============================
> 
> include "biblio-notes.rnc" { start = ModsSchema }
> 
> include "mods.rnc" {
>     extension = element extension { biblio-notes }*
> }

You have now a conflict between the start element redefined in your
first include and a start element defined in your second include.

How to solve this depends on your actual schemas and on what you're
trying to achieve.

I have tried to explain the different mechanisms in my book:

http://books.xmlschemata.org/relaxng/RngBookBuildingBlocks.html

but can't give any advise without have a better idea of what's in your
schemas.

Eric

-- 
Did you know it? Python has now a Relax NG (partial) implementation.
                                          http://advogato.org/proj/xvif/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From bdarcus@fastmail.fm Tue Nov 25 23:36:08 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPGa8EV095898
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 23:36:08 +0700 (ICT)
X-Sasl-enc: U+rSv0kXnzL/+ePCJTtCuw 1069778166
Received: from fastmail.fm (darcusb.geo.muohio.edu [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id D0C80443A66
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 11:36:05 -0500 (EST)
Date: Tue, 25 Nov 2003 11:36:03 -0500
Subject: Re: [relaxng-user] combining schemas
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
In-Reply-To: <1069777739.1108.169.camel@delleric>
Message-Id: <75BE99EC-1F65-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 16:36:08 -0000


On Tuesday, November 25, 2003, at 11:28  AM, Eric van der Vlist wrote:

> You have now a conflict between the start element redefined in your
> first include and a start element defined in your second include.

I had originally redefined the start pattern for biblio-notes as 
ModsSchema, but got the same error.

> How to solve this depends on your actual schemas and on what you're
> trying to achieve.

See my other message for links to the schemas.

> I have tried to explain the different mechanisms in my book.

Your book has been really helpful to me; thanks for making it 
available!  However, even after reading it, I can't quite wrap my head 
around this issue.

Bruce


From vdv@dyomedea.com Tue Nov 25 23:37:36 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPGbTMQ096114
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 23:37:33 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP
	id 35BCBBC52; Tue, 25 Nov 2003 17:36:56 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
In-Reply-To: <8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
References: <8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069778243.1106.184.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 25 Nov 2003 17:37:23 +0100
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 16:37:36 -0000

On Tue, 2003-11-25 at 17:22, Bruce D'Arcus wrote:

> 
> http://www.users.muohio.edu/darcusb/files/biblio-notes.rnc
> http://www.users.muohio.edu/darcusb/files/mods3.rnc
> 

> 
> ===============================
> 
> include "biblio-notes.rnc" { start = ModsSchema }
> 
> include "mods.rnc" {
>     extension = element extension { biblio-notes }*
> }


Hmm....

>From what I understand, you want to have a start element equal to
"ModsSchema".

The simplest solution is to remove the definition of the start pattern
in biblio-notes.rnc and just write:

==============================================
include "biblio-notes.rnc"

include "mods.rnc" {
    extension = element extension { biblio-notes }*
}
==============================================

If for any reason, you wanted to leave the definition of the start
pattern in biblio-notes.rnc, you could replace this by:

==============================================

include "mods.rnc" {
    extension = element extension { external "biblio-notes.rnc" }*
}
==============================================

Hope this helps.

Eric
-- 
Rendez vous a Paris pour le Forum XML.
                                    http://www.technoforum.fr/integ2003/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From cowan@mercury.ccil.org Wed Nov 26 00:02:49 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPH2mUr001152
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:02:49 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOgaP-0005yP-00; Tue, 25 Nov 2003 12:02:49 -0500
Date: Tue, 25 Nov 2003 12:02:49 -0500
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] combining schemas
Message-ID: <20031125170249.GE10250@mercury.ccil.org>
References: <20031125161111.GC10250@mercury.ccil.org>
	<8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 17:02:50 -0000

Bruce D'Arcus scripsit:

> include "biblio-notes.rnc" { start = ModsSchema }
> 
> include "mods.rnc" {
>    extension = element extension { biblio-notes }*
> }

Well, to begin with you are trying to override a rule named "extension",
but there is no such rule in mods.rnc, so you have to refactor it so
you have such a rule.  While you're at it, how about removing all
that "notAllowed | foo" cruft in favor of just "foo"?

Your other problem is fundamental: you are importing the definition of
start from two different places, and you can't override both of them at
the same time.  This is a deficiency in RNG: the obvious workaround is
to remove the start definition from biblio-notes.rnc.

(Committee members, perhaps there needs to be a way to delete a rule at
include time?)

> * Original schema is at 
> http://www.loc.gov/standards/mods/v3/mods-3-0-draft-oct-9.xsd

This gets a 404.

-- 
All Norstrilians knew what laughter was:        John Cowan
it was "pleasurable corrigible malfunction".    http://www.reutershealth.com
        --Cordwainer Smith, _Norstrilia_        jcowan@reutershealth.com

From bdarcus@fastmail.fm Wed Nov 26 00:12:59 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPHCoF0002922
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:12:59 +0700 (ICT)
X-Sasl-enc: KPTStPAr3OBJHamsDP8Tjw 1069780368
Received: from fastmail.fm (darcusb.geo.muohio.edu [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id BCF094444FE
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 12:12:47 -0500 (EST)
Date: Tue, 25 Nov 2003 12:12:44 -0500
Subject: Re: [relaxng-user] combining schemas
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
In-Reply-To: <20031125170249.GE10250@mercury.ccil.org>
Message-Id: <958A527C-1F6A-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 17:13:00 -0000


On Tuesday, November 25, 2003, at 12:02  PM, John Cowan wrote:

> While you're at it, how about removing all that "notAllowed | foo" 
> cruft in favor of just "foo"?

I'm happy to spend a bit of time cleaning this up, as I'd really like 
to have a RNG version of the schema available that others can work 
with.  The Library of Congress, however, develops in XML Schema, and so 
the version I posted is (not very elegantly) machine converted. I 
didn't have the time (or skill) to rebuild it in Relax NG myself!

What might the function of the ""notAllowed | foo' cruft"?  And any 
other suggestions?

>> * Original schema is at
>> http://www.loc.gov/standards/mods/v3/mods-3-0-draft-oct-9.xsd
>
> This gets a 404.

Seems they switched to a newer version without updating the link.  
Here's the correct url:

http://www.loc.gov/standards/mods/v3/mods-3-0-draft-nov-24.xsd

Bruce


From vdv@dyomedea.com Wed Nov 26 00:15:46 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPHFb8d003349
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:15:42 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP
	id 759B4BC52; Tue, 25 Nov 2003 18:15:04 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: John Cowan <cowan@mercury.ccil.org>
In-Reply-To: <20031125170249.GE10250@mercury.ccil.org>
References: <20031125161111.GC10250@mercury.ccil.org>
	<8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
	<20031125170249.GE10250@mercury.ccil.org>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069780532.1104.233.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 25 Nov 2003 18:15:32 +0100
Content-Transfer-Encoding: 7bit
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 17:15:46 -0000

On Tue, 2003-11-25 at 18:02, John Cowan wrote:

> 
> (Committee members, perhaps there needs to be a way to delete a rule at
> include time?)

I think that this is already possible.

Consider:

inc1.rnc
+++++++++++++++++++++++++++
start = element foo{empty}
+++++++++++++++++++++++++++

inc2.rnc
+++++++++++++++++++++++++++
start = element bar{empty}
+++++++++++++++++++++++++++

If you want to include inc1.rnc and keep only the definition of the
start element in inc2.rnc, you can write:


+++++++++++++++++++++++++++
include "inc1.rnc" {
	start |= notAllowed
}
include "inc2.rnc"
+++++++++++++++++++++++++++


Eric
-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From cowan@mercury.ccil.org Wed Nov 26 00:33:28 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPHXSdS006103
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:33:28 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOh42-0006vF-00; Tue, 25 Nov 2003 12:33:26 -0500
Date: Tue, 25 Nov 2003 12:33:26 -0500
To: Eric van der Vlist <vdv@dyomedea.com>
Subject: Re: [relaxng-user] combining schemas
Message-ID: <20031125173326.GA26214@mercury.ccil.org>
References: <20031125161111.GC10250@mercury.ccil.org>
	<8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
	<20031125170249.GE10250@mercury.ccil.org>
	<1069780532.1104.233.camel@delleric>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <1069780532.1104.233.camel@delleric>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 17:33:31 -0000

Eric van der Vlist scripsit:

> If you want to include inc1.rnc and keep only the definition of the
> start element in inc2.rnc, you can write:
> 
> 
> +++++++++++++++++++++++++++
> include "inc1.rnc" {
> 	start |= notAllowed
> }
> include "inc2.rnc"
> +++++++++++++++++++++++++++

Very clever.  This should go in a FAQ somewhere.

-- 
John Cowan  jcowan@reutershealth.com  www.ccil.org/~cowan  www.reutershealth.com
"If I have seen farther than others, it is because I am surrounded by dwarves."
        --Murray Gell-Mann

From dpawson@nildram.co.uk Wed Nov 26 00:59:38 2003
Received: from smithers.nildram.co.uk (smithers.nildram.co.uk [195.112.4.54]
	(may be forged))
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPHxbB5010195
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:59:37 +0700 (ICT)
Received: from main.nildram.co.uk (dpawson.gotadsl.co.uk [81.6.251.105])
	by smithers.nildram.co.uk (Postfix) with ESMTP
	id D250F2FB820; Tue, 25 Nov 2003 17:59:10 +0000 (GMT)
Message-Id: <6.0.0.22.2.20031125175743.025aa998@pop3.Nildram.co.uk>
X-Sender: dpawson@pop3.Nildram.co.uk
X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22
Date: Tue, 25 Nov 2003 17:59:36 +0000
To: John Cowan <cowan@mercury.ccil.org>, Eric van der Vlist <vdv@dyomedea.com>
From: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] combining schemas
In-Reply-To: <20031125173326.GA26214@mercury.ccil.org>
References: <20031125161111.GC10250@mercury.ccil.org>
	<8727E968-1F63-11D8-BDCA-000A959F0E52@fastmail.fm>
	<20031125170249.GE10250@mercury.ccil.org>
	<1069780532.1104.233.camel@delleric>
	<20031125173326.GA26214@mercury.ccil.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 17:59:39 -0000

At 17:33 25/11/2003, John Cowan wrote:

>Very clever.  This should go in a FAQ somewhere.

I've started one. Mainly based around patterns....
I.e. Eric's book.

http://www.dpawson.co.uk/relaxng/index.html

Input...or explained questions, appreciated.
   I'll publish it more widely when there is more content.

regards DaveP



From bdarcus@fastmail.fm Wed Nov 26 01:02:40 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPI2eZI010997
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 01:02:40 +0700 (ICT)
X-Sasl-enc: g8VVNGk+WMSyWouhH2trKA 1069783358
Received: from fastmail.fm (unknown [134.53.57.141])
	by mail.messagingengine.com (Postfix) with ESMTP id 0ACF54443BC
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 13:02:38 -0500 (EST)
Date: Tue, 25 Nov 2003 13:02:35 -0500
Subject: Re: [relaxng-user] combining schemas
Content-Type: text/plain; charset=US-ASCII; format=flowed
Mime-Version: 1.0 (Apple Message framework v552)
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
To: relaxng-user@relaxng.org
Content-Transfer-Encoding: 7bit
In-Reply-To: <1069778243.1106.184.camel@delleric>
Message-Id: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
X-Mailer: Apple Mail (2.552)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 18:02:40 -0000


OK, we're making progress.  NXML mode will now load the schema without 
complaining.  However, it will not give me any completion options 
anywhere!

I've commented out the start pattern for biblio-notes, and modified the 
mods schema to have the necessary named pattern for extension, which 
I've reposted here:

http://www.users.muohio.edu/darcusb/files/mods3.rnc

Bruce

On Tuesday, November 25, 2003, at 11:37  AM, Eric van der Vlist wrote:

> The simplest solution is to remove the definition of the start pattern
> in biblio-notes.rnc and just write:
>
> ==============================================
> include "biblio-notes.rnc"
>
> include "mods.rnc" {
>     extension = element extension { biblio-notes }*
> }
> ==============================================


From dpawson@nildram.co.uk Wed Nov 26 01:14:15 2003
Received: from smithers.nildram.co.uk (smithers.nildram.co.uk [195.112.4.54]
	(may be forged))
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPIEFYs012793
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 01:14:15 +0700 (ICT)
Received: from main.nildram.co.uk (dpawson.gotadsl.co.uk [81.6.251.105])
	by smithers.nildram.co.uk (Postfix) with ESMTP
	id 942392A038A; Tue, 25 Nov 2003 18:13:24 +0000 (GMT)
Message-Id: <6.0.0.22.2.20031125181231.02675220@pop3.Nildram.co.uk>
X-Sender: dpawson@pop3.Nildram.co.uk
X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22
Date: Tue, 25 Nov 2003 18:13:48 +0000
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>, relaxng-user@relaxng.org
From: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] combining schemas
In-Reply-To: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
References: <1069778243.1106.184.camel@delleric>
	<8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"; format=flowed
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 18:14:16 -0000

At 18:02 25/11/2003, Bruce D'Arcus wrote:

>OK, we're making progress.  NXML mode will now load the schema without 
>complaining.  However, it will not give me any completion options anywhere!

I found a mouse-trap yesterday.

If a DTD source has an undefined element,
that element comes over into .rnc file such that
nothing shows as valid.

Another DTD weakness/too lax option perhaps?

HTH DaveP.



From vdv@dyomedea.com Wed Nov 26 01:26:06 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPIPqkF014447
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 01:25:58 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id 15A91BC52
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:25:13 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
References: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069784740.1097.250.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Tue, 25 Nov 2003 19:25:40 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 18:26:07 -0000

On Tue, 2003-11-25 at 19:02, Bruce D'Arcus wrote:
> OK, we're making progress.  NXML mode will now load the schema without 
> complaining.  However, it will not give me any completion options 
> anywhere!

In your schema, the element extension appears in:

ModsType =
  attribute version { xsd:string "3.0" }?,
  attribute ID { xsd:ID }?,
  (titleInfo
   | name
   | typeOfResource
   | genre
   | originInfo
   | language2
   | physicalDescription
   | abstract
   | tableOfContents
   | targetAudience
   | note
   | subject
   | classification
   | relatedItem
   | identifier
   | location
   | accessCondition
   | (notAllowed
      | element extension {
          mixed { element0+ }
        })
   | recordInfo)+

What you want to redefine is in fact the content of the extension
element to allow your biblio-notes element instead of "element0" which
is a wildcard generated by the schema converter you've been using.

If we look at your overall schema!

include "biblio-notes.rnc" { start = ModsSchema }

include "mods.rnc" {
    extension = element extension { biblio-notes }*
}

You can't redefine the named pattern "extension" since it doesn't exist
in mods.rnc (BTW, it's strange that the RNG processor hasn't raised an
error here).

You could redefine "element0" but that would still give you a mixed
content model for extension with one or more occurrences of
biblio-notes.

One option is to define an "extension-content" pattern:

============
...
ModsType =
  attribute version { xsd:string "3.0" }?,
  attribute ID { xsd:ID }?,
  (titleInfo
   | name
   | typeOfResource
   | genre
   | originInfo
   | language2
   | physicalDescription
   | abstract
   | tableOfContents
   | targetAudience
   | note
   | subject
   | classification
   | relatedItem
   | identifier
   | location
   | accessCondition
   | element extension { extension-content } *
   | recordInfo)+


extension-content = mixed { element0+ }
...
============

and then your schema becomes:

==============================================
include "biblio-notes.rnc"

include "mods.rnc" {
     extension-content = biblio-notes
 }
==============================================

Another option with the same mods.rnc and a biblio-notes.rnc where
you've got a start pattern is simply:

==============================================
include "mods.rnc" {
     extension-content = external "biblio-notes.rnc"
 }
==============================================

Hope that helps.

Eric
-- 
Did you know it? Python has now a Relax NG (partial) implementation.
                                          http://advogato.org/proj/xvif/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From cowan@mercury.ccil.org Wed Nov 26 01:34:21 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPIYL8V015690
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 01:34:21 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AOi0y-0000Ut-00; Tue, 25 Nov 2003 13:34:20 -0500
Date: Tue, 25 Nov 2003 13:34:20 -0500
To: Dave Pawson <dpawson@nildram.co.uk>
Subject: Re: [relaxng-user] combining schemas
Message-ID: <20031125183419.GD26214@mercury.ccil.org>
References: <1069778243.1106.184.camel@delleric>
	<8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
	<6.0.0.22.2.20031125181231.02675220@pop3.Nildram.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <6.0.0.22.2.20031125181231.02675220@pop3.Nildram.co.uk>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 18:34:24 -0000

Dave Pawson scripsit:
> At 18:02 25/11/2003, Bruce D'Arcus wrote:
> 
> >OK, we're making progress.  NXML mode will now load the schema without 
> >complaining.  However, it will not give me any completion options anywhere!
> 
> I found a mouse-trap yesterday.
> 
> If a DTD source has an undefined element,
> that element comes over into .rnc file such that
> nothing shows as valid.

Exactly right.  If an undefined element A is an essential part (not
optional, nor choice) of the content model of element B, then any use
of element B is ipso facto invalid.

-- 
BALIN FUNDINUL          UZBAD KHAZADDUMU        jcowan@reutershealth.com
BALIN SON OF FUNDIN     LORD OF KHAZAD-DUM      http://www.ccil.org/~cowan

From dvd@davidashen.net Wed Nov 26 03:37:36 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPKbUYL036320
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 03:37:33 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hAPKac3j010882
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 00:36:38 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hAPKacYt010881
	for relaxng-user@relaxng.org; Wed, 26 Nov 2003 00:36:38 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311252036.hAPKacYt010881@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Wed, 26 Nov 2003 00:36:38 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] trang: translating comments between compact and xml
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 20:37:36 -0000

Hi,

trang translates

element 
( a # case a
| b # case b
)
{ empty }

into

<?xml version="1.0" encoding="UTF-8"?>
<element xmlns="http://relaxng.org/ns/structure/1.0">
  <choice>
    <name>a</name>
    <!-- case a -->
    <name>b</name>
  </choice>
  <!-- case b -->
  <empty/>
</element>

moving the second comment past the end of the name class.  I realize that translation
of comments is not normative;  however, since the comments are translated by trang,
is there a list of patterns where comments do not stay in place during translation?

David Tolpin
http://davidashen.net/

From sebastian.rahtz@computing-services.oxford.ac.uk Wed Nov 26 03:52:27 2003
Received: from tx2.oucs.ox.ac.uk (tx2.oucs.ox.ac.uk [163.1.2.163])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAPKqQpw038452
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 03:52:27 +0700 (ICT)
Received: from scan2.oucs.ox.ac.uk ([163.1.2.162] helo=localhost)
	by tx2.oucs.ox.ac.uk with esmtp (Exim 4.20) id 1AOkAc-00066W-JR
	for relaxng-user@relaxng.org; Tue, 25 Nov 2003 20:52:26 +0000
Received: from rx2.oucs.ox.ac.uk ([163.1.2.161])
	by localhost (scan2.oucs.ox.ac.uk [163.1.2.162]) (amavisd-new, port 25)
	with ESMTP id 23416-01 for <relaxng-user@relaxng.org>;
	Tue, 25 Nov 2003 20:52:25 +0000 (GMT)
Received: from wing1.herald.ox.ac.uk ([163.1.0.225])
	by rx2.oucs.ox.ac.uk with esmtp (Exim 4.20) id 1AOkAb-00066Q-92
	for relaxng-user@relaxng.org; Tue, 25 Nov 2003 20:52:25 +0000
Received: from httpd by wing1.herald.ox.ac.uk with local (Exim 3.35 #1)
	id 1AOkAb-000730-00
	for relaxng-user@relaxng.org; Tue, 25 Nov 2003 20:52:25 +0000
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
From: Sebastian Rahtz <sebastian.rahtz@computing-services.oxford.ac.uk>
Date: Tue, 25 Nov 2003 20:52:25 +0000 (GMT)
To: relaxng-user@relaxng.org
Message-Id: <E1AOkAb-000730-00@wing1.herald.ox.ac.uk>
Subject: [relaxng-user] TEI relaxng schemas
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Tue, 25 Nov 2003 20:52:27 -0000

Members of this list may be interested in http://www.tei-c.org/P5/, which contains
material about a new RelaxNG version of the Text Encoding Initiative guidelines. This is pre-alpha stuff, not endorsed yet by the TEI technical council, but may amuse some.

The TEI is authored in its own literate programming language (a superset of the normal TEI), which describes a fairly elaborate class system for TEI elements. The  elements are described in TEI notation, with their body expressed in relax ng XML notation. This means that the documentation and schemas are all generated from a single master mixed-namespace XML document, all of which can be  validated. The generated HTML documentation shows the relaxng fragments in compact notation, for 
readability. DTDs are generated from the master source, and XSD is generated (on a good day) from relaxng schemas.

just thought you'd like to hear of another large project doing relaxng

Sebastian Rahtz

From bdarcus@fastmail.fm Wed Nov 26 07:53:15 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQ0r93E072495
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 07:53:15 +0700 (ICT)
X-Sasl-enc: a9OEPgLxMDDmoWKL47NsQQ 1069807981
Received: from [134.53.28.81] (u81.s28.muohio.edu [134.53.28.81])
	by mail.messagingengine.com (Postfix) with ESMTP id 337F7445171
	for <relaxng-user@relaxng.org>; Tue, 25 Nov 2003 19:53:00 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
In-Reply-To: <1069784740.1097.250.camel@delleric>
References: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069784740.1097.250.camel@delleric>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <F583CA53-1FAA-11D8-A92F-000A95B10832@fastmail.fm>
Content-Transfer-Encoding: 7bit
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] combining schemas
Date: Tue, 25 Nov 2003 19:53:33 -0500
To: relaxng-user@relaxng.org
X-Mailer: Apple Mail (2.606)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 00:53:17 -0000


OK, I finally got it to work correctly, more or less.  Thanks all!

Here's an example fragment created using nxml mode:

     <extension xmlns:bn="http://refdb.sourceforge.net/biblio-notes-ns">
       <bn:biblio-notes>
	<bn:note user="darcusb">
	  <bn:para>Got it to <bn:emphasis>work!</bn:emphasis></bn:para>
	</bn:note>
       </bn:biblio-notes>
     </extension>

I just have a couple of questions remaining.

The first is about namespaces.  In the biblio-notes schema, I have the 
following namespace definition:

	default namespace  = "http://refdb.sourceforge.net/biblio-notes-ns"

The most obvious question is whether this is the correct way to specify 
the namespace in this circumstance.

Also, should I be requiring the namespace prefix here, when the 
namespace is defined on the extension element?  In this example, if 
remove the namespace prefix from the declaration and the included 
elements, I get an "unknown element" error on the extension element.

Finally, as I recall nxml mode normally automatically completes the 
namespace declaration.  it does not do so in this circumstance.  Is 
this likely a limitation of nxml, or a problem in my definition?

Bruce


From vdv@dyomedea.com Wed Nov 26 13:56:02 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQ6u16P018109
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 13:56:02 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id 3993EBC52
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 07:55:27 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <F583CA53-1FAA-11D8-A92F-000A95B10832@fastmail.fm>
References: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069784740.1097.250.camel@delleric>
	<F583CA53-1FAA-11D8-A92F-000A95B10832@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069829754.1097.270.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Wed, 26 Nov 2003 07:55:54 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 06:56:04 -0000

On Wed, 2003-11-26 at 01:53, Bruce D'Arcus wrote:
> OK, I finally got it to work correctly, more or less.  

Good!

> Thanks all!
> 
> Here's an example fragment created using nxml mode:
> 
>      <extension xmlns:bn="http://refdb.sourceforge.net/biblio-notes-ns">
>        <bn:biblio-notes>
> 	<bn:note user="darcusb">
> 	  <bn:para>Got it to <bn:emphasis>work!</bn:emphasis></bn:para>
> 	</bn:note>
>        </bn:biblio-notes>
>      </extension>
> 
> I just have a couple of questions remaining.
> 
> The first is about namespaces.  In the biblio-notes schema, I have the 
> following namespace definition:
> 
> 	default namespace  = "http://refdb.sourceforge.net/biblio-notes-ns"
> 
> The most obvious question is whether this is the correct way to specify 
> the namespace in this circumstance.

Yes.

> Also, should I be requiring the namespace prefix here, when the 
> namespace is defined on the extension element?  

The namespaces rec states that prefixes are just shortcuts assigned to
namespaces identifiers and that their values are not significant. As a
result, you can't require a namespace prefix with RELAX NG (nor with W3C
XML Schema). To require a specific prefix, you'd need to use either DTDs
or Schematron but, again, that would not be conform to the intention of
namespaces.

> In this example, if remove the namespace prefix from the declaration 
> and the included elements, I get an "unknown element" error on the
> extension element.

What do you mean? 

Per the namespaces spec, this is a different document that should be
invalid:

     <extension>
       <biblio-notes>
        <note user="darcusb">
          <para>Got it to <emphasis>work!</emphasis></para>
        </note>
       </biblio-notes>
     </extension>

But this one is equivalent to your snippet and it should be valid:

     <extension>
       <biblio-notes
xmlns="http://refdb.sourceforge.net/biblio-notes-ns">
        <note user="darcusb">
          <para>Got it to <emphasis>work!</emphasis></para>
        </note>
       </biblio-notes>
     </extension>

> Finally, as I recall nxml mode normally automatically completes the 
> namespace declaration.  it does not do so in this circumstance.  Is 
> this likely a limitation of nxml, or a problem in my definition?

Your definition looks good.

Eric
-- 
Read me on XML.com.
                                            http://www.xml.com/pub/au/74
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Wed Nov 26 15:56:23 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQ8uI0n033053
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 15:56:21 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hAQ8tR3j014034
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 12:55:27 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hAQ8tR1a014033
	for relaxng-user@relaxng.org; Wed, 26 Nov 2003 12:55:27 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311260855.hAQ8tR1a014033@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Wed, 26 Nov 2003 12:55:27 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] 'any' documentation
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 08:56:23 -0000

The Compact Syntax Specification says that

"Any ## comments must precede any annotation in square brackets."

May please someone  clarify what the phrase means?  Does 'any' apply to the
schema in whole or to each pattern? 

A valid and invalid example in respect to this rule would be helpful.

I would also like to reiterate my previous question: do I understand it correctly
that escaped linefeed (\x{a}) terminates a comment and is a whitespace, while
escaped carriage return (\x{d}) does not and is not?

David Tolpin

From bdarcus@fastmail.fm Wed Nov 26 17:53:45 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQArj2R047574
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 17:53:45 +0700 (ICT)
X-Sasl-enc: MPewQVuQQD3HXF0juEIEoQ 1069844022
Received: from [134.53.28.91] (u91.s28.muohio.edu [134.53.28.91])
	by mail.messagingengine.com (Postfix) with ESMTP id 5AFC3446862
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 05:53:38 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
In-Reply-To: <1069829754.1097.270.camel@delleric>
References: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069784740.1097.250.camel@delleric>
	<F583CA53-1FAA-11D8-A92F-000A95B10832@fastmail.fm>
	<1069829754.1097.270.camel@delleric>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <D3B1E604-1FFE-11D8-A92F-000A95B10832@fastmail.fm>
Content-Transfer-Encoding: 7bit
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] combining schemas
Date: Wed, 26 Nov 2003 05:53:54 -0500
To: relaxng-user@relaxng.org
X-Mailer: Apple Mail (2.606)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 10:53:47 -0000

On Nov 26, 2003, at 1:55 AM, Eric van der Vlist wrote:

>> In this example, if remove the namespace prefix from the declaration
>> and the included elements, I get an "unknown element" error on the
>> extension element.
>
> What do you mean?

That nxml mode then says that the extension element is "unknown."  
Moving the declaration to the biblio-notes element solves that issue 
though.

>> Finally, as I recall nxml mode normally automatically completes the
>> namespace declaration.  it does not do so in this circumstance.  Is
>> this likely a limitation of nxml, or a problem in my definition?
>
> Your definition looks good.

OK thanks.  Will look into it more.

I'm now going through and cleaning up the mods schema.  Can someone 
suggest how I might simplify the below?  This is the 
auto-generated-from-the-XML-Schema stuff:

anyType =
   mixed {
     (attribute * { text }
      | element1)*
   },
   empty

and:

element0 =
   element * {
     mixed {
       (element0
        | attribute * { text })*
     }
   }

element1 =
   element * {
     mixed {
       (attribute * { text }
        | element1)*
     }
   }

The patterns get used throughout like so:

     | element displayForm { anyType }

I wonder if I can just eliminate those patterns and replace them with 
simply "text." My goal is a clean RNG schema, but also one fully 
compatible with the XML Schema, so I'm just being careful here.

Bruce


From vdv@dyomedea.com Wed Nov 26 18:13:24 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQBDLOL050185
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 18:13:23 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id C44D2BCA1
	for <relaxng-user@relaxng.org>; Wed, 26 Nov 2003 12:12:51 +0100 (CET)
Subject: Re: [relaxng-user] combining schemas
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <D3B1E604-1FFE-11D8-A92F-000A95B10832@fastmail.fm>
References: <8C59F38A-1F71-11D8-BDCA-000A959F0E52@fastmail.fm>
	<1069784740.1097.250.camel@delleric>
	<F583CA53-1FAA-11D8-A92F-000A95B10832@fastmail.fm>
	<1069829754.1097.270.camel@delleric>
	<D3B1E604-1FFE-11D8-A92F-000A95B10832@fastmail.fm>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1069845199.1097.408.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Wed, 26 Nov 2003 12:13:19 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 11:13:25 -0000

On Wed, 2003-11-26 at 11:53, Bruce D'Arcus wrote:

> I'm now going through and cleaning up the mods schema.  Can someone 
> suggest how I might simplify the below?  This is the 
> auto-generated-from-the-XML-Schema stuff:
> 
> anyType =
>    mixed {
>      (attribute * { text }
>       | element1)*
>    },
>    empty
> 
> and:
> 
> element0 =
>    element * {
>      mixed {
>        (element0
>         | attribute * { text })*
>      }
>    }
> 
> element1 =
>    element * {
>      mixed {
>        (attribute * { text }
>         | element1)*
>      }
>    }
> 
> The patterns get used throughout like so:
> 
>      | element displayForm { anyType }
> 
> I wonder if I can just eliminate those patterns and replace them with 
> simply "text." 

No, not really. They are meant to allow any element and text node in the
extension element.

If you want that the RNG schema keeps that feature when it's used
standalone, you must keep such definitions.

Replacing them by text would mean that valid documents per the WXS
schema could be invalid per your RNG schema.

Eric
-- 
Did you know it? Python has now a Relax NG (partial) implementation.
                                          http://advogato.org/proj/xvif/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Thu Nov 27 05:14:28 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQMEOk9044339
	for <relaxng-user@relaxng.org>; Thu, 27 Nov 2003 05:14:27 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hAQMDU3j017917
	for <relaxng-user@relaxng.org>; Thu, 27 Nov 2003 02:13:30 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hAQMDTcu017916
	for relaxng-user@relaxng.org; Thu, 27 Nov 2003 02:13:29 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311262213.hAQMDTcu017916@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Thu, 27 Nov 2003 02:13:29 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] repeated data
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 22:14:30 -0000

Hi,

my impression is that 

element foo { "a"+ }

is an invalid pattern. However, trang accepts it and converts into
corresponding XML Syntax.

Is the pattern valid?

David Tolpin

From cowan@mercury.ccil.org Thu Nov 27 06:13:21 2003
Received: from mercury.ccil.org (mercury.ccil.org [192.190.237.100])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAQNDL4K052628
	for <relaxng-user@relaxng.org>; Thu, 27 Nov 2003 06:13:21 +0700 (ICT)
Received: from cowan by mercury.ccil.org with local (Exim 3.35 #1 (Debian))
	id 1AP8qM-0002dT-00; Wed, 26 Nov 2003 18:13:10 -0500
Date: Wed, 26 Nov 2003 18:13:10 -0500
To: David Tolpin <dvd@davidashen.net>
Subject: Re: [relaxng-user] repeated data
Message-ID: <20031126231309.GA9692@mercury.ccil.org>
References: <200311262213.hAQMDTcu017916@adat.davidashen.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200311262213.hAQMDTcu017916@adat.davidashen.net>
User-Agent: Mutt/1.3.28i
From: John Cowan <cowan@mercury.ccil.org>
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Wed, 26 Nov 2003 23:13:22 -0000

David Tolpin scripsit:

> element foo { "a"+ }
> 
> is an invalid pattern. However, trang accepts it and converts into
> corresponding XML Syntax.

It is indeed invalid.  Trang is not guaranteed to catch errors in input, and
when the output is xsd, it may generate erroneous output as well.
It's a best-effort program.

-- 
Only do what only you can do.           John Cowan <jcowan@reutershealth.com>
  --Edsger W. Dijkstra,                 http://www.reutershealth.com
    deceased 6 August 2002              http://www.ccil.org/~cowan

From dvd@davidashen.net Thu Nov 27 07:52:14 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAR0qBYM064835
	for <relaxng-user@relaxng.org>; Thu, 27 Nov 2003 07:52:13 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hAR0pG3j025812
	for <relaxng-user@relaxng.org>; Thu, 27 Nov 2003 04:51:16 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hAR0pGSO025811
	for relaxng-user@relaxng.org; Thu, 27 Nov 2003 04:51:16 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311270051.hAR0pGSO025811@adat.davidashen.net>
Subject: Re: [relaxng-user] repeated data
In-Reply-To: <20031126231309.GA9692@mercury.ccil.org>
To: relaxng-user@relaxng.org
Date: Thu, 27 Nov 2003 04:51:16 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 27 Nov 2003 00:52:17 -0000

> David Tolpin scripsit:
> 
> > element foo { "a"+ }
> > 
> > is an invalid pattern. However, trang accepts it and converts into
> > corresponding XML Syntax.
> 
> It is indeed invalid.  Trang is not guaranteed to catch errors in input, and
> when the output is xsd, it may generate erroneous output as well.
> It's a best-effort program.

Thank you, I realize it now that since grouping restrictions are specified for
the simple form,  and trang does not translate to the simple form. 

Interestingly, nXML does not check restrictions either, and successfully validates
against this grammar (that is, it allows sequences of a, but not other strings).

Why this restriction is imposed at all?

David Tolpin


From dvd@davidashen.net Fri Nov 28 20:59:50 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASDxkHa019110
	for <relaxng-user@relaxng.org>; Fri, 28 Nov 2003 20:59:48 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASDwe3j034610
	for <relaxng-user@relaxng.org>; Fri, 28 Nov 2003 17:58:40 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASDwdCH034609
	for relaxng-user@relaxng.org; Fri, 28 Nov 2003 17:58:39 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311281358.hASDwdCH034609@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Fri, 28 Nov 2003 17:58:39 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] groupability
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 13:59:50 -0000

I am writing a Relax NG parser.

I must resolve all references (ref,parentRef) before checking groupability
restrictions, right?

That is, I cannot do it in one pass and must carry information about the position
of a pattern in the source code to the second pass?

David

From dvd@davidashen.net Sat Nov 29 03:02:12 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASK283b063501
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 03:02:10 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASK113j035596
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 00:01:01 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASK10w5035595
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 00:01:00 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282001.hASK10w5035595@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 00:01:00 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] missing start element
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 20:02:13 -0000

Hi,

why

start = element foo {grammar{}}

is illegal?  It matches productions in the specification, and I cannot find
where it is required that 'start' is required.

David

From vdv@dyomedea.com Sat Nov 29 03:35:41 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASKZef0066953
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 03:35:41 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id EFFA0BC8B
	for <relaxng-user@relaxng.org>; Fri, 28 Nov 2003 21:35:05 +0100 (CET)
Subject: Re: [relaxng-user] missing start element
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200311282001.hASK10w5035595@adat.davidashen.net>
References: <200311282001.hASK10w5035595@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1070051733.1096.3588.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Fri, 28 Nov 2003 21:35:33 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 20:35:41 -0000

Hi,

On Fri, 2003-11-28 at 21:01, David Tolpin wrote:
> Hi,
> 
> why
> 
> start = element foo {grammar{}}
> 
> is illegal?  It matches productions in the specification, and I cannot find
> where it is required that 'start' is required.

A reason (maybe not the only one) why this is illegal is that this would
be simplified as :

start = element foo {}

and that "element foo {}" is illegal.

Eric
-- 
Curious about Relax NG? My book in progress is waiting for your review!
                                   http://books.xmlschemata.org/relaxng/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Sat Nov 29 03:55:09 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASKt6V7069457
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 03:55:08 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASKrx3j035873
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 00:53:59 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASKrx3g035872
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 00:53:59 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282053.hASKrx3g035872@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start element
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 00:53:59 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 20:55:10 -0000

> 
> A reason (maybe not the only one) why this is illegal is that this would
> be simplified as :
> 
> start = element foo {}
> 
> and that "element foo {}" is illegal.

This is simply not that what is written in the specification. The specification says
that

1) a grammar element can be empty. The grammar, both in EBNF and in RNG says so.
2) In the simplification rule for 'grammar', it says: "Next, move all define
elements to be children of the top-level grammar element, replace each nested
grammar element by the child of its start element and rename each parentRef
element to ref."

It does not say what to do with an empty grammar element at all. 

Besides, nXML validates against the grammar above as though element foo {grammar {}}
is the same as element {empty}, while jing rejects the grammar.  No behaviour
is defined in the specification and either behaviour can be accepted as an extension
of the currently specified behaviour. 

Which one is the correct one? Should the grammar for RNG be modified so that
grammar is 

start & (define|include|div)*

instead of

(start|define|include|div)*

?

David Tolpin

From vdv@dyomedea.com Sat Nov 29 04:03:18 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASL3HVM070764
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 04:03:18 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id 1DFD3BC8B
	for <relaxng-user@relaxng.org>; Fri, 28 Nov 2003 22:02:49 +0100 (CET)
Subject: Re: [relaxng-user] missing start element
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200311282053.hASKrx3g035872@adat.davidashen.net>
References: <200311282053.hASKrx3g035872@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1070053396.1106.3620.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Fri, 28 Nov 2003 22:03:17 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 21:03:18 -0000

On Fri, 2003-11-28 at 21:53, David Tolpin wrote:
> > 
> > A reason (maybe not the only one) why this is illegal is that this would
> > be simplified as :
> > 
> > start = element foo {}
> > 
> > and that "element foo {}" is illegal.
> 
> This is simply not that what is written in the specification. The specification says
> that
> 
> 1) a grammar element can be empty. The grammar, both in EBNF and in RNG says so.
> 2) In the simplification rule for 'grammar', it says: "Next, move all define
> elements to be children of the top-level grammar element, replace each nested
> grammar element by the child of its start element and rename each parentRef
> element to ref."
> 
> It does not say what to do with an empty grammar element at all. 

Well, then that's just my interpretation of "replace each nested
grammar element by the child of its start element" to think that in that
case this is just nothing!

> Besides, nXML validates against the grammar above as though element foo {grammar {}}
> is the same as element {empty}, while jing rejects the grammar.  No behaviour
> is defined in the specification and either behaviour can be accepted as an extension
> of the currently specified behaviour. 
> 
> Which one is the correct one? Should the grammar for RNG be modified so that
> grammar is 
> 
> start & (define|include|div)*
> 
> instead of
> 
> (start|define|include|div)*

No, because you can define a grammar without start pattern that you
include in other grammars which have a start pattern.

Eric

-- 
Read me on XMLhack.
                                      http://xmlhack.com/author.php?id=8
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Sat Nov 29 04:17:19 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASLHEat072390
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 04:17:17 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASLG63j036013
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 01:16:06 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASLG6jf036012
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 01:16:06 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282116.hASLG6jf036012@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start element
In-Reply-To: <1070053396.1106.3620.camel@delleric>
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 01:16:06 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 21:17:20 -0000

> > Which one is the correct one? Should the grammar for RNG be modified so that
> > grammar is 
> > 
> > start & (define|include|div)*
> > 
> > instead of
> > 
> > (start|define|include|div)*
> 
> No, because you can define a grammar without start pattern that you
> include in other grammars which have a start pattern.

OK. So the only grammars which can omit start element are top-level ones? In which
case it is not a pattern because it does not match?

It makes things more clear, thank you. I would still prefer to have RELAX NG schema
for RELAX NG specifying it.

David Tolpin

From vdv@dyomedea.com Sat Nov 29 04:27:38 2003
Received: from evlist.paris.dyomedea.com (dyomedea.net1.nerim.net
	[213.41.162.60])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASLRbD0073527
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 04:27:38 +0700 (ICT)
Received: from 6-allhosts (unknown [10.0.0.2])
	by evlist.paris.dyomedea.com (Postfix) with ESMTP id 2DA7EBC89
	for <relaxng-user@relaxng.org>; Fri, 28 Nov 2003 22:27:08 +0100 (CET)
Subject: Re: [relaxng-user] missing start element
From: Eric van der Vlist <vdv@dyomedea.com>
To: relaxng-user@relaxng.org
In-Reply-To: <200311282116.hASLG6jf036012@adat.davidashen.net>
References: <200311282116.hASLG6jf036012@adat.davidashen.net>
Content-Type: text/plain
Organization: Dyomedea (http://dyomedea.com)
Message-Id: <1070054855.1104.3654.camel@delleric>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 
Date: Fri, 28 Nov 2003 22:27:36 +0100
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 21:27:38 -0000

On Fri, 2003-11-28 at 22:16, David Tolpin wrote:

> It makes things more clear, thank you. I would still prefer to have RELAX NG schema
> for RELAX NG specifying it.

This is a general problem with RELAX NG: most of the language
restrictions can't be captured by the RNG schema for RNG.

The reason is that most of the restrictions of RNG are expressed on the
schema after simplification while the RNG schema for RNG describes the
schema before simplification.

OTH, I think that's this design decision is one of the reasons for the
level of flexibility of RELAX NG and that's a fair enough price to pay!

Eric
-- 
Read me on Advogato.
                                         http://advogato.org/person/vdv/
Upcoming XML schema languages tutorials:
 - Philadelphia -full day- ( 7/12/2003)        http://masl.to/?V28612FC5
 - Santa Clara  -half day- (15/03/2004)        http://masl.to/?J24916E96
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


From dvd@davidashen.net Sat Nov 29 04:43:59 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASLhtqt075239
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 04:43:57 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASLgl3j036172
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 01:42:47 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASLgluC036171
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 01:42:47 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282142.hASLgluC036171@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start elementt
In-Reply-To: <1070054855.1104.3654.camel@delleric>
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 01:42:47 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 21:43:59 -0000

> This is a general problem with RELAX NG: most of the language
> restrictions can't be captured by the RNG schema for RNG.

This one easily can, by the way. RNG is context specific, and specifying
that the 'grammar' element has different content models in different contexts
is possible.

On the other hand, if includeContent is different from grammarContent, then
topLevelContent can be different too. It is easy and natural in BNF, RNG
and plain text. I would be glad to see this part of the specification updated --
it would make my life easier.

David Tolpin

From dvd@davidashen.net Sat Nov 29 06:15:00 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASNEuE7085582
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 06:14:58 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASNDn3j038080
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 03:13:49 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASNDm5W038079
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 03:13:48 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282313.hASNDm5W038079@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 03:13:48 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] implicit grammar
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 23:15:01 -0000

Hi,

What's the reason  behind not allowing implicit grammars in included schemas?

David

From dvd@davidashen.net Sat Nov 29 03:53:12 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hASKr8G8069206
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 03:53:10 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hASKq23j035821
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 00:52:02 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hASKq2xh035820
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 00:52:02 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311282052.hASKq2xh035820@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start element
In-Reply-To: <1070051733.1096.3588.camel@delleric>
To: Eric van der Vlist <vdv@dyomedea.com>
Date: Sat, 29 Nov 2003 00:51:40 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Sender: dvd@davidashen.net
X-Mailman-Approved-At: Sat, 29 Nov 2003 16:06:24 +0700
Cc: 
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Nov 2003 20:53:12 -0000

> 
> A reason (maybe not the only one) why this is illegal is that this would
> be simplified as :
> 
> start = element foo {}
> 
> and that "element foo {}" is illegal.

This is simply not that what is written in the specification. The specification says
that

1) a grammar element can be empty. The grammar, both in EBNF and in RNG says so.
2) In the simplification rule for 'grammar', it says: "Next, move all define
elements to be children of the top-level grammar element, replace each nested
grammar element by the child of its start element and rename each parentRef
element to ref."

It does not say what to do with an empty grammar element at all. 

Besides, nXML validates against the grammar above as though element foo {grammar {}}
is the same as element {empty}, while jing rejects the grammar.  No behaviour
is defined in the specification and either behaviour can be accepted as an extension
of the currently specified behaviour. 

Which one is the correct one? Should the grammar for RNG be modified so that
grammar is 

start & (define|include|div)*

instead of

(start|define|include|div)*

?

David Tolpin

From darolst@pantor.com Sun Nov 30 02:13:59 2003
Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATJDqtk013835
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 02:13:59 +0700 (ICT)
Received: from pantor.com (as6-5-7.k.s.bonet.se [217.215.95.162])
	by mail.g.bonet.se (8.12.10/8.12.10) with ESMTP id hATJD0XS052447
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 20:13:00 +0100 (CET)
	(envelope-from darolst@pantor.com)
Message-ID: <3FC8EFEE.9030503@pantor.com>
Date: Sat, 29 Nov 2003 20:13:50 +0100
From: David Rosenborg <darolst@pantor.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5b) Gecko/20030901 Thunderbird/0.2
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] missing start elementt
References: <200311282142.hASLgluC036171@adat.davidashen.net>
In-Reply-To: <200311282142.hASLgluC036171@adat.davidashen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 19:14:00 -0000

Um, I think not. Simplification rule 4.18 clearly states "A grammar must 
have a start child element."
This is after the previous simplification rules has been applied. More 
specifically "4.7. include element"
is interesting in this situation.

start = element foo { grammar { include "grammar-with-start.rnc" }}

Provided that the included grammar does have a start pattern,
this is a perfectly valid schema and this shows that you cannot
require a start in the grammar before the simplification.

Cheers,
David

David Tolpin wrote:

>>This is a general problem with RELAX NG: most of the language
>>restrictions can't be captured by the RNG schema for RNG.
>>    
>>
>
>This one easily can, by the way. RNG is context specific, and specifying
>that the 'grammar' element has different content models in different contexts
>is possible.
>
>On the other hand, if includeContent is different from grammarContent, then
>topLevelContent can be different too. It is easy and natural in BNF, RNG
>and plain text. I would be glad to see this part of the specification updated --
>it would make my life easier.
>
>David Tolpin
>_______________________________________________
>relaxng-user mailing list
>relaxng-user@relaxng.org
>http://relaxng.org/mailman/listinfo/relaxng-user
>  
>



From dvd@davidashen.net Sun Nov 30 02:55:33 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATJtUkN018233
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 02:55:32 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hATJsG3j044295
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 23:54:16 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hATJsGuM044294
	for relaxng-user@relaxng.org; Sat, 29 Nov 2003 23:54:16 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311291954.hATJsGuM044294@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start elementt
In-Reply-To: <3FC8EFEE.9030503@pantor.com>
To: relaxng-user@relaxng.org
Date: Sat, 29 Nov 2003 23:54:16 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 19:55:34 -0000

> Um, I think not. Simplification rule 4.18 clearly states "A grammar must 
> have a start child element."
> This is after the previous simplification rules has been applied. More 
> specifically "4.7. include element"
> is interesting in this situation.
> 
> start = element foo { grammar { include "grammar-with-start.rnc" }}
> 
> Provided that the included grammar does have a start pattern,
> this is a perfectly valid schema and this shows that you cannot
> require a start in the grammar before the simplification.

David,

you are right, thank you. Another question:

why is, in the compact syntax, top-level '"grammar" "{" ... "}"' is optional for the main
module but required for included and referenced modules? (That is, why jing and nXML
both require it)? The spec says that it "must be a grammar". 

Why implicit grammar is not allowed?

David


From darolst@pantor.com Sun Nov 30 04:39:34 2003
Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATLdWZW029350
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 04:39:34 +0700 (ICT)
Received: from pantor.com (as6-5-7.k.s.bonet.se [217.215.95.162])
	by mail.g.bonet.se (8.12.10/8.12.10) with ESMTP id hATLccXS060093
	for <relaxng-user@relaxng.org>; Sat, 29 Nov 2003 22:38:39 +0100 (CET)
	(envelope-from darolst@pantor.com)
Message-ID: <3FC91211.5010601@pantor.com>
Date: Sat, 29 Nov 2003 22:39:29 +0100
From: David Rosenborg <darolst@pantor.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5b) Gecko/20030901 Thunderbird/0.2
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] missing start elementt
References: <200311291954.hATJsGuM044294@adat.davidashen.net>
In-Reply-To: <200311291954.hATJsGuM044294@adat.davidashen.net>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 21:39:35 -0000

It's not required for any top level grammars.
The compact to XML syntax translation is
done on a file per file basis. So the translator
doesn't really have any idea of what is a
main module or an included module. So each
file has its own top level. Therefore, the following is
perfectly valid:

schema1.rnc:

include "schema2.rnc"
start = foo

schema2.rnc:

foo = element foo { text }

Cheers,
David

David Tolpin wrote:

> why is, in the compact syntax, top-level '"grammar" "{" ... "}"' is 
> optional for the main
>
>module but required for included and referenced modules? (That is, why jing and nXML
>both require it)? The spec says that it "must be a grammar". 
>
>Why implicit grammar is not allowed?
>
>David
>
>  
>



From dvd@davidashen.net Sun Nov 30 05:17:21 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATMHIY4033528
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 05:17:20 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hATMG43j045248
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 02:16:04 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hATMG181045247
	for relaxng-user@relaxng.org; Sun, 30 Nov 2003 02:16:01 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311292216.hATMG181045247@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start elementt
In-Reply-To: <3FC91211.5010601@pantor.com>
To: relaxng-user@relaxng.org
Date: Sun, 30 Nov 2003 02:16:01 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 22:17:22 -0000

> file has its own top level. Therefore, the following is
> perfectly valid:
> 

Hmm, indeed. I must have looked at the wrong place.  I am sorry for the many
questions.

Another question:

test.rnc

start = foo
foo= element foo {external "testi.rnc"}

testi.rnc

foo|empty

nXML accepts it. jing says that the reference is to undefined pattern. Does externalRef
create a new scope?

David

From dvd@davidashen.net Sun Nov 30 05:33:24 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATMXLSu035096
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 05:33:23 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hATMW73j045579
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 02:32:07 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hATMW7GC045578
	for relaxng-user@relaxng.org; Sun, 30 Nov 2003 02:32:07 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311292232.hATMW7GC045578@adat.davidashen.net>
Subject: Re: [relaxng-user] missing start elementt
In-Reply-To: <200311292216.hATMG181045247@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Sun, 30 Nov 2003 02:32:07 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 22:33:25 -0000

> > file has its own top level. Therefore, the following is
> > perfectly valid:
> > 
> 
> Hmm, indeed. I must have looked at the wrong place.  I am sorry for the many
> questions.
> 
> Another question:
> 
> test.rnc
> 
> start = foo
> foo= element foo {external "testi.rnc"}
> 
> testi.rnc
> 
> foo|empty
> 
> nXML accepts it. jing says that the reference is to undefined pattern. Does externalRef
> create a new scope?

Further on,

if I translate the grammar above using trang into XML Syntax, the referenced file is translated
into 'grammar' element, and the grammar is still invalid. If I remove the wrapping grammar element,
then the grammar is valid.

If I then translate the valid XML RNG schema into either XML or compact syntax using trang,
I get invalid grammar.

I'm lost.  The question is not whether trang is perfect or not. The question is whether there is
an implicit grammar in a file consisting of  a single pattern. and if there is, why nXML and jing
both complain when I try to include testi.rnc (include "testi.rnc"; either syntax error or 'not
a grammar').

David

From dvd@davidashen.net Sun Nov 30 05:42:44 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATMgfnM036076
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 05:42:43 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hATMfR3j045645
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 02:41:27 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hATMfRNP045644
	for relaxng-user@relaxng.org; Sun, 30 Nov 2003 02:41:27 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200311292241.hATMfRNP045644@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Sun, 30 Nov 2003 02:41:27 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] Difference between externalRef and include
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 22:42:46 -0000

The RELAX NG Specification says that the resource behind URI passed as argument to 'externalRef'
must much the syntax for pattern, while one passed to 'include' must match the syntax for grammar.

The Relax NG Compact Syntax says that both should reference a grammar in the compact syntax.

The latter makes me think that a file is either sintactically valid for both referencing from externalRef
and include or invalid for both contexts. Both Jing and nXML disagree with me.

Further on, jing parses contents of an external file passed to externalRef as a grammar,
but refuses to accept the same file if passed to include.

David Tolpin

From darolst@pantor.com Sun Nov 30 06:37:12 2003
Received: from mail.g.bonet.se (mail.g.bonet.se [212.181.52.4])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hATNbBkV041428
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 06:37:11 +0700 (ICT)
Received: from pantor.com (as6-5-7.k.s.bonet.se [217.215.95.162])
	by mail.g.bonet.se (8.12.10/8.12.10) with ESMTP id hATNaHXS066222
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 00:36:18 +0100 (CET)
	(envelope-from darolst@pantor.com)
Message-ID: <3FC92DA4.6050609@pantor.com>
Date: Sun, 30 Nov 2003 00:37:08 +0100
From: David Rosenborg <darolst@pantor.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
	rv:1.5b) Gecko/20030901 Thunderbird/0.2
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: relaxng-user@relaxng.org
Subject: Re: [relaxng-user] missing start elementt
References: <200311292232.hATMW7GC045578@adat.davidashen.net>
In-Reply-To: <200311292232.hATMW7GC045578@adat.davidashen.net>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Nov 2003 23:37:12 -0000

Your example is correct, and should after transformation and
simplification be isomorphic with:

<grammar xmlns="http://relaxng.org/ns/structure/1.0">
  <start>
    <ref name="foo-0"/>
  </start>
  <define name="foo-0">
    <element>
      <name ns="">foo</name>
      <choice>
        <empty/>
        <ref name="foo-0"/>
      </choice>
    </element>
  </define>
</grammar>

So any tool saying otherwise is wrong.

Cheers,
David

David Tolpin wrote:

>>Another question:
>>
>>test.rnc
>>
>>start = foo
>>foo= element foo {external "testi.rnc"}
>>
>>testi.rnc
>>
>>foo|empty
>>
>>nXML accepts it. jing says that the reference is to undefined pattern. Does externalRef
>>create a new scope?
>>    
>>
>
>Further on,
>
>if I translate the grammar above using trang into XML Syntax, the referenced file is translated
>into 'grammar' element, and the grammar is still invalid. If I remove the wrapping grammar element,
>then the grammar is valid.
>
>If I then translate the valid XML RNG schema into either XML or compact syntax using trang,
>I get invalid grammar.
>
>I'm lost.  The question is not whether trang is perfect or not. The question is whether there is
>an implicit grammar in a file consisting of  a single pattern. and if there is, why nXML and jing
>both complain when I try to include testi.rnc (include "testi.rnc"; either syntax error or 'not
>a grammar').
>
>David
>_______________________________________________
>relaxng-user mailing list
>relaxng-user@relaxng.org
>http://relaxng.org/mailman/listinfo/relaxng-user
>  
>



From bdarcus@fastmail.fm Sun Nov 30 21:58:31 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAUEwVux038520
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 21:58:31 +0700 (ICT)
X-Sasl-enc: IxTSgl9nKhyKvKw0oYwvJg 1070204304
Received: from [134.53.28.38] (u38.s28.muohio.edu [134.53.28.38])
	by mail.messagingengine.com (Postfix) with ESMTP id ECAED451D7D
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 09:58:23 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
Content-Transfer-Encoding: 7bit
Message-Id: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
Content-Type: text/plain; charset=US-ASCII; format=flowed
To: relaxng-user@relaxng.org
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Date: Sun, 30 Nov 2003 09:59:02 -0500
X-Mailer: Apple Mail (2.606)
Subject: [relaxng-user] entities and characters?
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Nov 2003 14:58:31 -0000


I'm dealing with a DTD that uses character entities to represent 
typographic specs for bibliographies.  I know the schema languages 
don't do entities, so how would one deal with this in relax ng?  Use 
unicode numbers?  The characters themselves?

Put differently, is it a bad idea to develop a new DTD that relies on 
entities in this way, given the general shift away from DTDs in the XML 
world?  This is intended to be an xml equivalent to bibtex style files, 
so if successful, a couple/few years from now there should be a lot of 
them available.  Future proof-ness should be a goal, then.

Here's a fragment of an instance based on the DTD:

       <title beforesep="&lsquo;" aftersep="&rsquo;&period;"></title>
       <book>
	<prefix beforesep="&space;" aftersep="&space;">In</prefix>
	<editor aftersep=", ">
	  <name>
	    <surname weight="bold"></surname>
	    <forename beforesep="&comma;&space;"></forename>
	  </name>
	  <name beforesep=", " aftersep=",">
	    <surname></surname>
	    <forename beforesep="&comma;&space;"></forename>
	  </name>

Bruce


From tbray@textuality.com Sun Nov 30 23:20:56 2003
Received: from mail.dev.antarcti.ca (gt.antarcti.ca [209.17.183.233])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAUGKtOx047276
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 23:20:55 +0700 (ICT)
Received: from [IPv6:::1] (dev1.dev.antarcti.ca [10.1.1.8])
	by mail.dev.antarcti.ca (Postfix) with ESMTP
	id 22C7910336; Sun, 30 Nov 2003 08:20:49 -0800 (PST)
In-Reply-To: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
Mime-Version: 1.0 (Apple Message framework v606)
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
Content-Transfer-Encoding: 7bit
From: Tim Bray <tbray@textuality.com>
Subject: Re: [relaxng-user] entities and characters?
Date: Sun, 30 Nov 2003 08:20:49 -0800
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
X-Mailer: Apple Mail (2.606)
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Nov 2003 16:20:57 -0000

On Nov 30, 2003, at 6:59 AM, Bruce D'Arcus wrote:

>
> I'm dealing with a DTD that uses character entities to represent 
> typographic specs for bibliographies.  I know the schema languages 
> don't do entities, so how would one deal with this in relax ng?  Use 
> unicode numbers?  The characters themselves?

You might find
   http://tbray.org/ongoing/When/200x/2003/09/27/UniEmacs
and
   http://norman.walsh.name/threads/xmlunicode

relevant, although they are quite Emacs-focused. -Tim


From bdarcus@fastmail.fm Sun Nov 30 23:39:38 2003
Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com
	[66.111.4.26])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAUGdbB4049316
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 23:39:37 +0700 (ICT)
X-Sasl-enc: X1+4IWbeSBIZxoNSnWp/9Q 1070210375
Received: from [134.53.28.22] (u22.s28.muohio.edu [134.53.28.22])
	by mail.messagingengine.com (Postfix) with ESMTP id 836C5451EBF
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 11:39:34 -0500 (EST)
Mime-Version: 1.0 (Apple Message framework v606)
In-Reply-To: <28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
	<28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
Content-Type: text/plain; charset=US-ASCII; format=flowed
Message-Id: <DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
Content-Transfer-Encoding: 7bit
From: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] entities and characters?
Date: Sun, 30 Nov 2003 11:40:14 -0500
To: relaxng-user@relaxng.org
X-Mailer: Apple Mail (2.606)
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Nov 2003 16:39:38 -0000


On Nov 30, 2003, at 11:20 AM, Tim Bray wrote:

> You might find
>   http://tbray.org/ongoing/When/200x/2003/09/27/UniEmacs
> and
>   http://norman.walsh.name/threads/xmlunicode
>
> relevant, although they are quite Emacs-focused.

Hi Tim,

Yeah, I've read this stuff before, and I get the sort of abstract 
argument.  Since I'm on Mac OS X and use emacs, I'm happy to just use 
unicode characters directly and be done with it actually.

However, I'm trying to understand how to deal with this specific 
example, where a) the spec needs to deal with extended characters, 
often (at least currently) in attributes and b) the person developing 
the DTD (Peter Flynn) uses Linux for the most part, is happy with DTDs 
and their entities, and loathe to learn something like RNG unless he 
must.  I'm also worried about the portability of the instances that 
results from the spec.

It seems to me it is in fact a bad idea to base anything new on 
entities, but I'm not sure if this is the correct conclusion, nor 
exactly why.  At the same time, I gather that using raw unicode 
characters will cause problems for many people, at least currently.

Bruce


From veillard@redhat.com Sun Nov 30 23:53:36 2003
Received: from devserv.devel.redhat.com (pix-525-pool.redhat.com
	[66.187.233.200])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hAUGraHX050640
	for <relaxng-user@relaxng.org>; Sun, 30 Nov 2003 23:53:36 +0700 (ICT)
Received: from devserv.devel.redhat.com (localhost.localdomain [127.0.0.1])
	by devserv.devel.redhat.com (8.12.10/8.12.10) with ESMTP id
	hAUGrGDl015485; Sun, 30 Nov 2003 11:53:16 -0500
Received: (from veillard@localhost)
	by devserv.devel.redhat.com (8.12.10/8.12.10/Submit) id hAUGrGjM015483; 
	Sun, 30 Nov 2003 11:53:16 -0500
Date: Sun, 30 Nov 2003 11:53:16 -0500
From: Daniel Veillard <veillard@redhat.com>
To: "Bruce D'Arcus" <bdarcus@fastmail.fm>
Subject: Re: [relaxng-user] entities and characters?
Message-ID: <20031130165316.GJ23634@redhat.com>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
	<28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
	<DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
User-Agent: Mutt/1.4.1i
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: veillard@redhat.com
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Sun, 30 Nov 2003 16:53:36 -0000

On Sun, Nov 30, 2003 at 11:40:14AM -0500, Bruce D'Arcus wrote:
> However, I'm trying to understand how to deal with this specific 
> example, where a) the spec needs to deal with extended characters, 
> often (at least currently) in attributes and b) the person developing 
> the DTD (Peter Flynn) uses Linux for the most part, is happy with DTDs 
> and their entities, and loathe to learn something like RNG unless he 
> must.  I'm also worried about the portability of the instances that 
> results from the spec.
> 
> It seems to me it is in fact a bad idea to base anything new on 
> entities, but I'm not sure if this is the correct conclusion, nor 
> exactly why.  At the same time, I gather that using raw unicode 
> characters will cause problems for many people, at least currently.

  Hum, it sounds to me that using entities in attributes is more
likely to give troubles (SAX "eats" them) when editing than using
Unicode characters. Of course it all depends on the tools used but
I would expect recent editors to be UTF-8 ready on Linux (if not they
need to be chased down and fixed or dropped).

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard@redhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/

From iinmgc00@ucv.udc.es Tue Dec  2 00:42:13 2003
Received: from unica.udc.es (unica.udc.es [193.147.41.3])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB1HgB5B038817
	for <relaxng-user@relaxng.org>; Tue, 2 Dec 2003 00:42:12 +0700 (ICT)
Received: from unica.udc.es (localhost [127.0.0.1])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id hB1Hg3ON013291
	for <relaxng-user@relaxng.org>; Mon, 1 Dec 2003 18:42:03 +0100 (CET)
Received: from necora.cdf.udc.es (necora.eps.cdf.udc.es [193.147.41.4])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id hB1Hg3Cl013286
	for <relaxng-user@relaxng.org>; Mon, 1 Dec 2003 18:42:03 +0100 (CET)
Received: from eps213 (eps213.eps.cdf.udc.es [193.144.52.213])
	by necora.cdf.udc.es (8.12.8p1/8.11.3) with SMTP id hB1Hg2IW023237
	for <relaxng-user@relaxng.org>; Mon, 1 Dec 2003 16:42:03 -0100 (GMT)
Message-ID: <003301c3b832$9aa53620$d53490c1@eps.cdf.udc.es>
From: =?iso-8859-1?Q?Manuel_Gonz=E1lez_Castro?= <iinmgc00@ucv.udc.es>
To: <relaxng-user@relaxng.org>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm><28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com><DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
	<20031130165316.GJ23634@redhat.com>
Date: Mon, 1 Dec 2003 18:43:12 +0100
Organization: UDC
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by thaiopensource.com id
	hB1HgB5B038817
Subject: [relaxng-user] schema in multiple files: trang problems
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Dec 2003 17:42:13 -0000

Hello,

I'm writing a modular schema in compact syntax, so I have

driver.rnc
module1.rnc
module2.rnc
...

I'm having problems when I translate my schema (file "driver.rnc") into XML syntax with trang (version 20030619).

1) The point between the name and the extension is missing in the generated module files:

driver.rng
module1rng   <== should be "module1.rng"
module2rng   <== should be "module2.rng"
...

2) In my schema design, all modules define elements and attributes in the default namespace, and the driver file includes them in a namespace with the "inherit" keyword. It looks like:

namespace myns = "http://mynamespace"
include "module1.rnc" inherit = myns
include "module2.rnc" inherit = myns 
...

However, after the translation into XML syntax the resulting RNG files (driver and modules) have all grammars, elements and attributes defined in the default namespace. It seems that trang ignores the namespace definition in my RNC driver file.

I tried with a driver file like this:

default namespace = "http://mynamespace"
include "module1.rnc"
include "module2.rnc"
...

And it happens the same. Any workarround for this?

Thanks in advance for your time,
Manuel




From dvd@davidashen.net Tue Dec  2 04:46:28 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB1LkOTQ080693
	for <relaxng-user@relaxng.org>; Tue, 2 Dec 2003 04:46:26 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hB1Lit3j054142; 
	Tue, 2 Dec 2003 01:44:55 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hB1LirKp054141;
	Tue, 2 Dec 2003 01:44:53 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200312012144.hB1LirKp054141@adat.davidashen.net>
Subject: Re: [relaxng-user] schema in multiple files: trang problems
In-Reply-To: <003301c3b832$9aa53620$d53490c1@eps.cdf.udc.es>
To: =?ISO-8859-1?Q?Manuel_Gonz=E1lez_Castro?= <iinmgc00@ucv.udc.es>
Date: Tue, 2 Dec 2003 01:44:53 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Cc: relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Dec 2003 21:46:29 -0000

> 2) In my schema design, all modules define elements and attributes in the default namespace, and the driver file includes them in a namespace with the "inherit" keyword. It looks like:
> 
> namespace myns = "http://mynamespace"
> include "module1.rnc" inherit = myns
> include "module2.rnc" inherit = myns 
> ...
> 
> However, after the translation into XML syntax the resulting RNG files (driver and modules) have all grammars, elements and attributes defined in the default namespace. It seems that trang ignores the namespace definition in my RNC driver file.
> 
> I tried with a driver file like this:
> 
> default namespace = "http://mynamespace"
> include "module1.rnc"
> include "module2.rnc"
> ...
> 
> And it happens the same. Any workarround for this?

Looking at the trang's source, there must be something that triggers addition of a namespace.
The following should work:

namespace myns = "http://mynamespace"
bar = element myns:bar {empty}
include "module1.rnc" inherit = myns

David

From dvd@davidashen.net Thu Dec  4 19:57:38 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB4CvZf7019280
	for <relaxng-user@relaxng.org>; Thu, 4 Dec 2003 19:57:37 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hB4Ctp3j096550
	for <relaxng-user@relaxng.org>; Thu, 4 Dec 2003 16:55:51 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hB4CtpUU096549
	for relaxng-user@relaxng.org; Thu, 4 Dec 2003 16:55:51 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200312041255.hB4CtpUU096549@adat.davidashen.net>
To: relaxng-user@relaxng.org
Date: Thu, 4 Dec 2003 16:55:51 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
Subject: [relaxng-user] content-type for notAllowed
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Thu, 04 Dec 2003 12:57:38 -0000

Hello,

I am trying to follow the specification. 

is the following valid

element foo {notAllowed}

?

I am asking because content-type is not specified for notAllowed, 
but the restriction is that "All patterns occurring as the content of an
element pattern must have a content-type."

So, notAllowed should have a content-type? 


David

From jjc@jclark.com Fri Dec  5 08:06:59 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB516wwQ029969
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:06:59 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB516nAB097871;
	Thu, 4 Dec 2003 18:06:50 -0700 (MST)
Subject: Re: [relaxng-user] content-type for notAllowed
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200312041255.hB4CtpUU096549@adat.davidashen.net>
References: <200312041255.hB4CtpUU096549@adat.davidashen.net>
Content-Type: text/plain
Message-Id: <1070582294.1776.29.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:01:52 +0700
Content-Transfer-Encoding: 7bit
Cc: relax-ng@lists.oasis-open.org, relaxng-user@relaxng.org
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:07:00 -0000

On Thu, 2003-12-04 at 19:55, David Tolpin wrote:
> Hello,
> 
> I am trying to follow the specification. 
> 
> is the following valid
> 
> element foo {notAllowed}
> 
> ?

Definitely.  It's explicitly allowed by the grammar in Section 5.

> I am asking because content-type is not specified for notAllowed, 
> but the restriction is that "All patterns occurring as the content of an
> element pattern must have a content-type."
> 
> So, notAllowed should have a content-type? 

It looks like there is a bug in 7.2 here. However, I don't think the fix
is to give notAllowed a content-type, because in the simplified form
notAllowed only appears as the content of the element by itself.  Rather
I think the fix is to say that a pattern occurring as the content of an
element must either be notAllowed or must have a content type.  This
parallels the production for top in Section 5.

James



From jjc@jclark.com Fri Dec  5 08:07:56 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB517tqp030092
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:07:55 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB517riI098073;
	Thu, 4 Dec 2003 18:07:54 -0700 (MST)
Subject: Re: [relaxng-user] schema in multiple files: trang problems
From: James Clark <jjc@jclark.com>
To: Manuel =?ISO-8859-1?Q?Gonz=E1lez?= Castro <iinmgc00@ucv.udc.es>
In-Reply-To: <003301c3b832$9aa53620$d53490c1@eps.cdf.udc.es>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
	<28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
	<DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
	<20031130165316.GJ23634@redhat.com>
	<003301c3b832$9aa53620$d53490c1@eps.cdf.udc.es>
Content-Type: text/plain; charset=UTF-8
Message-Id: <1070583508.1776.33.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:02:50 +0700
Content-Transfer-Encoding: 8bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:07:56 -0000

On Tue, 2003-12-02 at 00:43, Manuel González Castro wrote:
> Hello,
> 
> I'm writing a modular schema in compact syntax, so I have
> 
> driver.rnc
> module1.rnc
> module2.rnc
> ...
> 
> I'm having problems when I translate my schema (file "driver.rnc") into XML syntax with trang (version 20030619).
> 
> 1) The point between the name and the extension is missing in the generated module files:
> 
> driver.rng
> module1rng   <== should be "module1.rng"
> module2rng   <== should be "module2.rng"
> ...

I can't reproduce this.  If you send a proper bug report, I'll look at
it further.

> 2) In my schema design, all modules define elements and attributes in the default namespace, and the driver file includes them in a namespace with the "inherit" keyword. It looks like:
> 
> namespace myns = "http://mynamespace"
> include "module1.rnc" inherit = myns
> include "module2.rnc" inherit = myns 
> ...

Trang RNG output has some bugs in handling inherit on include.  They
should be fixed in the next version.

James



From jjc@jclark.com Fri Dec  5 08:09:03 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB5193xd030236
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:09:03 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB518uf6098244;
	Thu, 4 Dec 2003 18:08:57 -0700 (MST)
Subject: Re: [relaxng-user] Difference between externalRef and include
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200311292241.hATMfRNP045644@adat.davidashen.net>
References: <200311292241.hATMfRNP045644@adat.davidashen.net>
Content-Type: text/plain
Message-Id: <1070584256.1776.46.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:03:53 +0700
Content-Transfer-Encoding: 7bit
Cc: RELAX NG List <relax-ng@lists.oasis-open.org>,
	"relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:09:04 -0000

On Sun, 2003-11-30 at 05:41, David Tolpin wrote:
> The RELAX NG Specification says that the resource behind URI passed as argument to 'externalRef'
> must much the syntax for pattern, while one passed to 'include' must match the syntax for grammar.

This is correct.  It wouldn't be coherent for include to reference a
pattern.

> The Relax NG Compact Syntax says that both should reference a grammar in the compact syntax.

Section 2 in the Compact Syntax spec includes the sentence

"The value of an anyURILiteral specified with include or external is a
URI reference to a grammar in the compact syntax."

The point this sentence is trying to make is that the thing referenced
by include or external is in the compact syntax rather that the XML
syntax.  (At one stage trang's predecessor translated each file
individually and left file names unaltered.)  It's not trying to say
that what's referenced is always a grammar rather than a pattern.  I can
see now that the sentence is at best misleading and needs an errata.

Note that in the Compact Syntax spec, Appendix A contains the full,
rigorous specification and the other sections are an informal summary. 
When in doubt, consult Appendix A.

> Further on, jing parses contents of an external file passed to externalRef as a grammar,
> but refuses to accept the same file if passed to include.

A file referenced by externalRef is parsed as a pattern, which will be
unacceptable to include, unless it is also a grammar.  Are you saying
Jing is inconsistent with the RELAX NG spec?

James



From jjc@jclark.com Fri Dec  5 08:10:06 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB51A5AH030372
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:10:05 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB519xZR098456;
	Thu, 4 Dec 2003 18:10:00 -0700 (MST)
Subject: Re: [relaxng-user] missing start elementt
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200311292216.hATMG181045247@adat.davidashen.net>
References: <200311292216.hATMG181045247@adat.davidashen.net>
Content-Type: text/plain
Message-Id: <1070585867.1776.71.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:04:56 +0700
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:10:06 -0000

On Sun, 2003-11-30 at 05:16, David Tolpin wrote:

> Another question:
> 
> test.rnc
> 
> start = foo
> foo= element foo {external "testi.rnc"}
> 
> testi.rnc
> 
> foo|empty

This is fine.

> jing says that the reference is to undefined pattern.

The jing I have here accepts it.  I can't remember whether this was
something I fixed since the last public release, and I can't
conveniently check this right now.

James



From jjc@jclark.com Fri Dec  5 08:36:34 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB51aXdx034022
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:36:33 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB51aQRd004201;
	Thu, 4 Dec 2003 18:36:27 -0700 (MST)
Subject: Re: [relaxng-user] implicit grammar
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200311282313.hASNDm5W038079@adat.davidashen.net>
References: <200311282313.hASNDm5W038079@adat.davidashen.net>
Content-Type: text/plain
Message-Id: <1070587878.1776.77.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:31:18 +0700
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:36:35 -0000

On Sat, 2003-11-29 at 06:13, David Tolpin wrote:
> Hi,
> 
> What's the reason  behind not allowing implicit grammars in included schemas?

They are allowed.  Each file in a compact syntax schema is translated
individually to XML syntax. Each file is translated the same way whether
its the top level file, referenced in include or referenced in external.
The compact syntax schema is correct if the requirements of Appendix A
of the Compact Syntax spec are met and if the resulting XML syntax
schema is correct.

James


From jjc@jclark.com Fri Dec  5 08:43:17 2003
Received: from jclark.com (jclark.com [128.121.116.162])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB51hGdp034811
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 08:43:16 +0700 (ICT)
Received: from [10.0.2.32] (115.suba418.attnet.ne.jp [202.33.78.115])
	by jclark.com (8.12.10/8.11.2) with ESMTP id hB51hA5T005536;
	Thu, 4 Dec 2003 18:43:10 -0700 (MST)
Subject: Re: [relaxng-user] groupability
From: James Clark <jjc@jclark.com>
To: David Tolpin <dvd@davidashen.net>
In-Reply-To: <200311281358.hASDwdCH034609@adat.davidashen.net>
References: <200311281358.hASDwdCH034609@adat.davidashen.net>
Content-Type: text/plain
Message-Id: <1070588283.1776.84.camel@rambutan.bkk.thaiopensource.com>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) 
Date: Fri, 05 Dec 2003 08:38:03 +0700
Content-Transfer-Encoding: 7bit
Cc: "relaxng-user@relaxng.org" <relaxng-user@relaxng.org>
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 01:43:19 -0000

On Fri, 2003-11-28 at 20:58, David Tolpin wrote:

> I must resolve all references (ref,parentRef) before checking groupability
> restrictions, right?

Yes.  The groupability restrictions are expressed on simple form.

> That is, I cannot do it in one pass and must carry information about the position
> of a pattern in the source code to the second pass?

If you want to report position information for violations of
groupability restrictions, then I think the schema parser has to create
structures with position information.

James



From dvd@davidashen.net Fri Dec  5 16:46:30 2003
Received: from adat.davidashen.net ([217.113.20.242])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB59kQeU095381
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 16:46:28 +0700 (ICT)
Received: from adat.davidashen.net (localhost.davidashen.net [127.0.0.1])
	by adat.davidashen.net (8.12.8p1/8.12.8) with ESMTP id hB59ib3j002753
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 13:44:37 +0400 (AMT)
	(envelope-from dvd@adat.davidashen.net)
Received: (from dvd@localhost)
	by adat.davidashen.net (8.12.8p1/8.12.8/Submit) id hB59iap4002752
	for relaxng-user@relaxng.org; Fri, 5 Dec 2003 13:44:36 +0400 (AMT)
From: David Tolpin <dvd@davidashen.net>
Message-Id: <200312050944.hB59iap4002752@adat.davidashen.net>
Subject: Re: [relaxng-user] Difference between externalRef and include
In-Reply-To: <1070584256.1776.46.camel@rambutan.bkk.thaiopensource.com>
To: relaxng-user@relaxng.org
Date: Fri, 5 Dec 2003 13:44:36 +0400 (AMT)
X-Mailer: ELM [version 2.4ME+ PL99b (25)]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=US-ASCII
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 09:46:31 -0000

> > Further on, jing parses contents of an external file passed to externalRef as a grammar,
> > but refuses to accept the same file if passed to include.
> 
> A file referenced by externalRef is parsed as a pattern, which will be
> unacceptable to include, unless it is also a grammar.  Are you saying
> Jing is inconsistent with the RELAX NG spec?

James,

thank you for the explanation. Jing is conformant and consistent, I was looking
at the testing results at 3 o'clock in the night. I am terribly sorry.

David

From iinmgc00@ucv.udc.es Fri Dec  5 17:17:37 2003
Received: from unica.udc.es (unica.udc.es [193.147.41.3])
	by thaiopensource.com (8.12.10/8.11.2) with ESMTP id hB5AHa4B099146
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 17:17:36 +0700 (ICT)
Received: from unica.udc.es (localhost [127.0.0.1])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id hB5AHU1o005544
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 11:17:30 +0100 (CET)
Received: from necora.cdf.udc.es (necora.eps.cdf.udc.es [193.147.41.4])
	by unica.udc.es (8.12.8p1/8.12.3) with ESMTP id hB5AHT04005536
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 11:17:29 +0100 (CET)
Received: from eps213 (eps213.eps.cdf.udc.es [193.144.52.213])
	by necora.cdf.udc.es (8.12.8p1/8.11.3) with SMTP id hB5AHRIW020944
	for <relaxng-user@relaxng.org>; Fri, 5 Dec 2003 09:17:28 -0100 (GMT)
Message-ID: <006401c3bb19$29bca030$d53490c1@eps.cdf.udc.es>
From: =?UTF-8?Q?Manuel_Gonz=C3=A1lez_Castro?= <iinmgc00@ucv.udc.es>
To: <relaxng-user@relaxng.org>
References: <BC6F8F5A-2345-11D8-A92F-000A95B10832@fastmail.fm>
	<28C62D22-2351-11D8-A001-000A95A51C9E@textuality.com>
	<DF2690BE-2353-11D8-A92F-000A95B10832@fastmail.fm>
	<20031130165316.GJ23634@redhat.com>
	<003301c3b832$9aa53620$d53490c1@eps.cdf.udc.es>
	<1070583508.1776.33.camel@rambutan.bkk.thaiopensource.com>
Subject: Re: [relaxng-user] schema in multiple files: trang problems
Date: Fri, 5 Dec 2003 11:18:39 +0100
Organization: UDC
MIME-Version: 1.0
Content-Type: text/plain;
	charset="UTF-8"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by thaiopensource.com id
	hB5AHa4B099146
X-BeenThere: relaxng-user@relaxng.org
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Mailing list for users of RELAX NG  <relaxng-user.relaxng.org>
List-Unsubscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=unsubscribe>
List-Archive: <http://relaxng.org/pipermail/relaxng-user>
List-Post: <mailto:relaxng-user@relaxng.org>
List-Help: <mailto:relaxng-user-request@relaxng.org?subject=help>
List-Subscribe: <http://relaxng.org/mailman/listinfo/relaxng-user>,
	<mailto:relaxng-user-request@relaxng.org?subject=subscribe>
X-List-Received-Date: Fri, 05 Dec 2003 10:17:38 -0000

Hello,

James Clark wrote:
>> On Tue, 2003-12-02 at 00:43, Manuel González Castro wrote:
>>> Hello,
>>> 
>>> I'm writing a modular schema in compact syntax, so I have
>>> 
>>> driver.rnc
>>> module1.rnc
>>> module2.rnc
>>> ...
>>> 
>>> I'm having problems when I translate my schema (file "driver.rnc")
>>> into XML syntax with trang (version 20030619). 
>>> 
>>> 1) The point between the name and the extension is missing in the
>>> generated module files: 
>>> 
>>> driver.rng
>>> module1rng   <== should be "module1.rng"
>>> module2rng   <== should be "module2.rng"
>>> ...
>> 
>> I can't reproduce this.  If you send a proper bug report, I'll look
>> at 
>> it further.

Sorry: I was testing an xml editor with a trang plugin, the trang.jar file that comes with it is 20030619 but for some extrange reason calling trang from the editor IDE causes the file extension problem. Calling trang from the command line works perfect, the bug is in the editor.

>>> 2) In my schema design, all modules define elements and attributes
>>> in the default namespace, and the dr