OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RELAX + Schematron



> 3. I want to write 2 sometimes using the entities which I've defined at the step 1.
> 
> How can I do that ?

As many other pointed out, combination of Schematron + RELAX (or TREX or
whatever grammar-based language) is possible.

James showed a Schematron-driven combination, so I'll show RELAX-driven
combination.

You can add arbitary <assert> and <report>  tag inside <elementRule>.

<elementRule label="foo">
  <s:assert test="count(xxx)=1">
    label 'XXX' always has 'xxx' as its tag name,
   and it can only be appeared once.
  </s:assert>
  
  <sequence>
    <choice occurs="*">
      <ref label="XXX" />
      <ref label="YYY" />
    </choice>
    <ref label="ZZZ" />
  </sequence>
</elementRule>

And these assertions are checked with every element that has label "foo".


Probably, you want to use RELAX's labels and roles within XPath
expression. I think that's what you wanted to do.

But IMO, such RELAX-customized (or TREX-customized or whatever) XPath is
a kind of overkill.

regards,
----------------------
K.Kawaguchi
E-Mail: k-kawa@bigfoot.com