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

 


Help: OASIS Mailing Lists Help | MarkMail Help

relax-ng-comment message

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


Subject: [relax-ng-comment] parameterized element definition


Dear all,

I wonder, if there is a paramterized element definition in RELAX NG.  
I want to define a set of elements, which pass another definitions to  
their subelements.  Though, I can describe a pattern which behaves 
similarly. For instance, I want to have

<define name="ParamDataType" param="SubDataType">
  <element name="value>
    <ref name="SubDataType/>
  </element>
</define>

So the sub-elements or the detailed definition of value depends
on the definition of that SubDataType.

I want to use the above definition, e.g. with

<define name="TextData">
  <text/>
</define>

<define name="IntData">
  <data type="int"/>
</define>

<element name="mystring">
  <ref name="ParamDataType" param="TextData"/>
</element>

<element name="mynumber">
  <ref name="ParamDataType" param="IntData"/>
</element>

These definitions should be similar to the following two definitions

<element name="mystring">
  <element name="value">
    <text/>
  </element>
</element>

<element name="mynumber">
  <element name="value">
    <data type="int"/>
  </element>
</element>

Is there a similar solution for this kind of problems in RELAX NG?

TIA

Kind regards

Micha
-- 
Michael Weber             Tel. +49-30-2093-3075; Fax +49-30-2093-3067
Institut f. Informatik, HU Berlin, Unter den Linden 6, D-10099 Berlin
mailto:mweber@informatik.hu-berlin.de 
http://www.informatik.hu-berlin.de/~mweber



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


Powered by eList eXpress LLC