Mixing data(types) and elements in Relax NG

123 views Asked by At

I am trying to define a Relax NG compact syntax model for the following content:

<coordinates class="blue">-132.976733 56.437924 <span class="red">-132.735747 56.459832 -132.631685 56.421493 -132.664547 56.273616</span> -132.878148 56.240754 -133.069841 56.333862 -132.976733 56.437924</coordinates>

Where the element could wrap one or more coordinate pairs, and could indeed have nested elements with the same content model.

Is this possible? I read here that it may not be possible using, for example xsd:double.

1

There are 1 answers

0
Peter Rushforth On

I believe this question is the same as this one, so I'm going to guess the answer is similar, something like "No, use the 'mixed' pattern, then Schematron the datatype constraints on the tokens".