[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Type-assignment

  • From: Murata Makoto <mura034@a...>
  • To: Kohsuke KAWAGUCHI <k-kawa@b...>
  • Date: Sat, 03 Feb 2001 10:04:43 +0900

assignment choice sequence
I would rather create the intersection/differences of labels.

In your example, the hedgeRule for catalyst has <choice>.  
Thus, you were able to merge the two labels.

Suppose we modify this hedgeRule as below:

<hedgeRule label="catalyst">
  <sequence>
    <ref label="foo" occurs="?"/>
    <ref label="bar" occurs="?"/>
  </sequence>
</hedgeRule>

This grammar is still ambiguous.

We have to rewrite all rules as below:

-------------------------------------------
<hedgeRule label="catalyst">
  <sequence>
    <choice occurs="?">
      <ref label="foo-and-not-bar"/>
      <ref label="foo-and-bar"/>
    </choice>
    <choice occurs="?">
      <ref label="bar-and-not-foo"/>
      <ref label="foo-and-bar"/>
    </choice>
  </sequence>
</hedgeRule>

<elementRule label="foo-and-bar" role="foo">
  exp1
</elementRule>

<elementRule label="foo-and-not-bar" role="foo">
  exp2
</elementRule>

<elementRule label="bar-and-not-foo" role="bar">
  exp3
</elementRule>

-------------------------------------------

Here, exp1 represents the intersection of <hedgeRef label="foo.model"
occurs="?" /> and <hedgeRef label="bar.model" occurs="?" />.  Since
RELAX does not have <concur> of TREX, computation of exp1 is not
straightforward.  That is, we have to compute an intersection hedge
automaton and then converts it to RELAX.  Unfortunately, this will 
cause significant changes to labels.

We take <hedgeRef label="bar.model" occurs="?" /> from <hedgeRef
label="foo.model" occurs="?" /> , and the remainder is exp2.  We take
<hedgeRef label="foo.model" occurs="?" /> from <hedgeRef
label="bar.model" occurs="?" />, and the remainder is exp3.  Again,
this will cause significant changes to labels.

If RELAX borrows <concur> of TREX and introduces <difference>, 
we can avoid significant changes to labels.

Cheers,

Makoto





PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.