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


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] How to Unique contraint

In Schematron, you might do something roughly like this,:

   <rule context="anElement">
       <assert test="@port != @debug-port">
       The port number must be different from the debug port number.
       <assert test="not( preceding::anElement[@port= current()/@port or 
@debug-port=current()/@port or
                       @port=current()/@debug-port ][ @debug-port = 
current()/@debug-port ])">
       A number can only be assigned once, either as a port or as a 
debug port.

If the anElement are in the same parent, then use preceding-sibling::  axis.

Rick Jelliffe

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

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS