W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > May 2007

p:equals proposal

From: Innovimax SARL <innovimax@gmail.com>
Date: Sat, 26 May 2007 10:01:03 +0200
Message-ID: <546c6c1c0705260101td2c9b9bm7106402b5538c8a8@mail.gmail.com>
To: "XProc WG" <public-xml-processing-model-wg@w3.org>


Here is a simple proposal

We have p:identity to output the identity as its output

In some case, I need to make comparison between outputs to know if
they are equals

Here is the proposal

== document version ==
 <p:input port="source">
 <p:input port="compare-to">
 <p:output port="result">
 <p:output port="alternate"/>
 <p:export-option name="is-equal"/><!-- type boolean() -->
 <p:export-option name="xpath-position"/><!-- type string() -->

If would do a sequential node by node comparaison. It would make
available to !result the content of !source and to !alternate the
content of !compare-to
At the end of the process, it would make available the value option
"$is-equal" binded to true() or false()
And it would make available the first position in document order where
the document differs as a simple xpath (of the form

== sequence version ==
(we need only one of those)

 <p:input port="source" sequence="yes">
 <p:input port="compare-to" sequence="yes">
 <p:output port="result" sequence="yes">
 <p:output port="alternate" sequence="yes"/>
 <p:export-option name="is-equal"/><!-- type boolean() -->
 <p:export-option name="xpath-position"/><!-- type string() -->
 <p:export-option name="document-position"/><!-- type number() -->

the same as above but with sequence and make also the
$document-position available as the number where the first difference
appears with the xpath positon in this document

Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 8 72 475787
Fax : +33 1 4356 1746
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Saturday, 26 May 2007 08:01:28 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:43 UTC