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

Re: XProc Editors Draft 2007-07-19: Appendix A.1 Comments

From: Innovimax SARL <innovimax@gmail.com>
Date: Tue, 24 Jul 2007 09:15:50 +0200
Message-ID: <546c6c1c0707240015r1aef66f5xfc4e5244ea87f35c@mail.gmail.com>
To: "Jeni Tennison" <jeni@jenitennison.com>
Cc: public-xml-processing-model-wg@w3.org

On 7/24/07, Jeni Tennison <jeni@jenitennison.com> wrote:
>
> Innovimax SARL wrote:
> > On 7/23/07, Jeni Tennison <jeni@jenitennison.com> wrote:
> >> A.1.3 Equal: The fail-if-not-equal option hasn't been described. Why
> >> return "1" or "0" rather than the more human-readable "true" or "false"?
> >
> > I think it match directly boolean() of XPath, isn'it ?
>
> The string value of boolean true is "true". The string value of boolean
> false is "false". Only if you first convert the boolean to a number do
> you get the strings "0" and "1".

yes but every where else we use "yes/no"
that's why I found less confusing "0/1" for boolean  la XPath and
yes/no boolean  la XSLT


>
> >> A.1.8 Insert: There's no need to specify an XPath context here, since
> >> this step has a match pattern, not a select expression.
> >>
> >> A.1.8 Insert: It would seem more useful to me to have insert add an
> >> element before or after the matched element itself. This would enable
> >> you to insert an element as the middle child, or in order (if the source
> >> was already sorted):
> >>
> >>    <p:insert>
> >>      <p:input port="insertion">
> >>        <p:inline><item n="3" /></p:inline>
> >>      </p:input>
> >>      <p:option name="match" value="/list/item[@n &lt; 3][last()]" />
> >>      <p:option name="before-or-after" value="before" />
> >>    </p:insert>
> >
> > Well what do you do in case the match pattern doesn't match anything ?
>
> Then you don't insert anything. The same is true if the match pattern
> doesn't match anything under the current description, right?

I remember now that I was asking to have feed back from the step to
know if there was insertion (same for deletion)

But I don't agree, it is not equivalent

If I have
<root/>

I cannot insert anything with the component the way you specifiy it,
without making the document non well formed


>
> Or perhaps you're talking about the specific example? Amend it with:
>
>    <p:option name="match"
>      value="/list/item[@n &lt; 3 or
>                        not(preceding-sibling::item)]
>                       [last()]" />
>    <p:option name="before-or-after" value="after" />

may be we should take a look at XQuery Update
-- your proposal --
 3.1.1 upd:insertBefore
 3.1.2 upd:insertAfter
-- /your proposal

 3.1.3 upd:insertInto (we don't need this one)

-- the status quo --
 3.1.4 upd:insertIntoAsFirst
 3.1.5 upd:insertIntoAsLast
-- /the status quo --

 3.1.6 upd:insertAttributes (this one is A.1.15 Set Attributes)


may be we should just provide both

<p:option name="position" default="as-first" />
and allowed values "as-first", "as-last", "after", "before"



>
> Jeni
> --
> Jeni Tennison
> http://www.jenitennison.com
>
>


-- 
Innovimax SARL
Consulting, Training & XML Development
9, impasse des Orteaux
75020 Paris
Tel : +33 9 52 475787
Fax : +33 1 4356 1746
http://www.innovimax.fr
RCS Paris 488.018.631
SARL au capital de 10.000 
Received on Tuesday, 24 July 2007 07:15:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:53 GMT