[Schematron] Help sought: implementation of Character Repertoire in XSLT2 for embedding in schematron
Rick Jelliffe
rjelliffe at allette.com.au
Mon Sep 22 06:02:59 EDT 2008
Dave Pawson wrote:
> I like that!
>
Me too. I wish we both ruled as Kings of the World.
> Mostly.
> <assert test="true()" properties="iso8859-15-text http-iri
> current-section current-text" >
>
> The vague space separator as per idrefs I'm less keen on?
>
It is exactly IDREFS, just like the diagnostics attribute, and not at
all vague.
> Is there a boolean relationship?
>
There is a semantic connection: the properties apply to the subject of
the assertion.
But there is no testing of the properties, so they act as links not
quasi assertions. So
there is no boolean relationship.
If the property can be pre-processed into assertions, then these
assertions then
do have a boolean relationship to the subject: the relationship
determined by
pattern/rule/assertion semantics.
> Perhaps this is mixing up different classes of properties?
> repertoire is true
> datatype = iri (boolean but not expressed as such?)
> current-text is this??? That doesn't quite fit does it?
>
Indeed, some dynamic text is not a datatype that can be tested. But both
are
properties of the (subject of) the assertion.
> I like expressing multiple constraints though. How to get some form of
> consistency of expression?
>
I suppose you could say that, if all properties can be converted into
assertions, then there is
an implicit 'and' between each of the properties. But I don't want to go
beyond XSLT
here: conditionals should be expressed in XPaths not some homemade logic
syntax in the
@properties attribute's value.
Of course, the other nice thing about properties is that it opens the
door for expressing
in Schematron schemas constraints in other syntaxes. For example, take
the example of
my Schematron to XSD converter and my XSD to Schematron converter, as
explored
in my blog.
Using the property element, it becomes trivial to round-trip content
models inside the
Schematron schema.
<assert property="address" >
...
</assert>
...
<property id="address" scheme="mime-type-for-relaxNG-compact" >
address = { firsline, secondline, thirdline, country, ZIP}
</property>
> Maybe I'm just nit picking because it's new syntax to me?
>
Nits=bad. Picks = good :-)
Cheers
Rick
More information about the Schematron
mailing list