Hello everyone,
I am looking for a way to store different telephone formats in the same element, depending on the country where the tel belongs to.
I would basically like to have a tag that would store the tel, but depending on the code (one from a predefined list) the schema would know what “pattern” to validate it against.
I am not sure at all how to go about this. The idea with the id “code” to distinguish the country probably won’t work. It’s just to illustrate my point.
Thanks
Peter
I think this is not possible with XML Schema at all.
There is some tool that might help: Schematron
I never used it.
Hello Peter,
here is slightly off-topic alternative: perform the necessary validation programmatically using a Tamino Server Extension.
This might not be as clean as a data model based solution, but it is a feasible approach.
A trigger Server Extension can be called when inserting or updating documents, and I think that you could easily code the necessary checks.
Please see the following documentation section for more details on triggers:
C:\Program Files\Software AG\Tamino\Tamino 4.1.1.1\Documentation\servext\setypes.htm#setrig
I hope that helps,
Trevor.
Thank you for all the replies.
I guess for now I am going to stay away from server extension, because of lack of time to learn how to code them.
I think I will wait till some better mechanism is introduced into tamino, such as the schematron or something else.
Thank you,
Peter