is it possible to reference objects within a shema?
The aim of the project is to have 2 XML-Instances referenced by id:
<text id=“text1” ref=“video1”>
Content of the Ice Age -Video
Thanks for help!
I am not sure if I got your question right, but I think in general you want to know if it is possible to create constraining rules within a schema file, such as if attribute A in XML document X has the value “XYZ”, attribute A1 at another location within X or another XML document also must have value “XYZ”.
Such constraints are currently not supported by XML Schema.
You can only constrain the value space of elements, attributes by using built-in-datatypes and facets.
There is a structure schema language called “Schematron”, that fills in the gap left by the XML Schema, see
However Schematron is not supported by Tamino.
You’ve got it right.
Thank you for your immediate help!
Hello … sorry to dig out such an old topic - but I’m confused.
I’m using Tamino 4.4.1 and in the documentation “Advanced Concepts” PDF Page 58 there is a constrain across documents:
<rule context = "collaboration[@type='jamSession']/jazzMusician"> <assert test = "number(translate(document(.)/*/birthDate,'1234567890-','1234567890')) < number(translate(substring(../performedAt/time,1,10),'1234567890-','1234567890'))"> No jam for unborn child <value-of select="document(.)/*/name/last"/>! </assert> </rule>
My question: Where do I have to place the code to achieve the result of this constraint? And what type of constraint is it - if it’s not schematron? In the whole doc there is no link ore explanation for this kind rule (none that I’m aware of).
Again sorry to worm up this topic.
there is no automatic support for such rules in Tamino.
The given example is just some self-defined xml language to describe an assertion that cannot be specified in XML schema and therefore cannot be validated by the XML document validation which is only based on XML schema.
In case a Tamino application wants Tamino to check such rules when storing or updating a document, this can be achieved with user-defined trigger server extensions. In a very generic framework, the application could define its own language for such rules (e.g. see example), could store such rules in its own doctype, and leave it to the Trigger to evaluate these rules.
Hope this helps,