- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 24 Jul 2007 07:50:54 +0100
- To: public-xml-processing-model-wg@w3.org
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". >> 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 < 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? Or perhaps you're talking about the specific example? Amend it with: <p:option name="match" value="/list/item[@n < 3 or not(preceding-sibling::item)] [last()]" /> <p:option name="before-or-after" value="after" /> Jeni -- Jeni Tennison http://www.jenitennison.com
Received on Tuesday, 24 July 2007 06:54:15 UTC