Lazy evaluation

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Lazy evaluation

max toro q
I have this code:

```xslt
<variable name="params" as="xs:boolean*">
   <apply-templates select="param" mode="#current">
      <with-param name="n" select="$n"/>
      <with-param name="d" select="$data"/>
   </apply-templates>
</variable>

<variable name="valid" select="$is-text
   and not(empty($data))
   and (every $p in $params satisfies $p)"/>
```

When $data is empty it fails because the templates for the *param*
elements expect a non-empty value for *d*.

My expectation was that, since $params is only referenced by $valid,
which is first testing that $data is not empty, then this wouldn't be
an issue.

Am I misinterpreting how XSLT is supposed to work, or is this an issue
with Saxon?
--
Max Toro

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Michael Kay
A processor is allowed to use lazy evaluation but it isn't required to. It's also allowed to re-order the operands of "and". I can't tell exactly what Saxon is doing with this fragment of code - I would need to see the rest of the stylesheet - but you certainly can't assume that @params won't be evaluated because the processor doesn't need to know its value.

Michael Kay
Saxonica
[hidden email]
+44 (0) 118 946 5893




On 6 Apr 2015, at 19:02, Max Toro <[hidden email]> wrote:

> I have this code:
>
> ```xslt
> <variable name="params" as="xs:boolean*">
>   <apply-templates select="param" mode="#current">
>      <with-param name="n" select="$n"/>
>      <with-param name="d" select="$data"/>
>   </apply-templates>
> </variable>
>
> <variable name="valid" select="$is-text
>   and not(empty($data))
>   and (every $p in $params satisfies $p)"/>
> ```
>
> When $data is empty it fails because the templates for the *param*
> elements expect a non-empty value for *d*.
>
> My expectation was that, since $params is only referenced by $valid,
> which is first testing that $data is not empty, then this wouldn't be
> an issue.
>
> Am I misinterpreting how XSLT is supposed to work, or is this an issue
> with Saxon?
> --
> Max Toro
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Dimitre Novatchev
In reply to this post by max toro q
In case the problem is reordering of "and" operands / operations,
there is a solution:

Instead of:

    x and y

use:

  if(x)
     then y
     else false

If I remember correctly, the spec says that in an "if x then y else z"
expression, y should not be evaluated if x is false.

On Mon, Apr 6, 2015 at 11:02 AM, Max Toro <[hidden email]> wrote:

> I have this code:
>
> ```xslt
> <variable name="params" as="xs:boolean*">
>    <apply-templates select="param" mode="#current">
>       <with-param name="n" select="$n"/>
>       <with-param name="d" select="$data"/>
>    </apply-templates>
> </variable>
>
> <variable name="valid" select="$is-text
>    and not(empty($data))
>    and (every $p in $params satisfies $p)"/>
> ```
>
> When $data is empty it fails because the templates for the *param*
> elements expect a non-empty value for *d*.
>
> My expectation was that, since $params is only referenced by $valid,
> which is first testing that $data is not empty, then this wouldn't be
> an issue.
>
> Am I misinterpreting how XSLT is supposed to work, or is this an issue
> with Saxon?
> --
> Max Toro
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

max toro q
In reply to this post by Michael Kay
> A processor is allowed to use lazy evaluation but it isn't required to.

Is it explicitly allowed? I couldn't find the word *lazy* in the
XPath, XSLT and related specs.

I'm disappointed I must say, I took laziness for granted, isn't it an
important feature to make a language more declarative? Now I have to
fill my code with `<xsl:choose>`.
--
Max Toro


On Mon, Apr 6, 2015 at 3:21 PM, Michael Kay <[hidden email]> wrote:

> A processor is allowed to use lazy evaluation but it isn't required to. It's also allowed to re-order the operands of "and". I can't tell exactly what Saxon is doing with this fragment of code - I would need to see the rest of the stylesheet - but you certainly can't assume that @params won't be evaluated because the processor doesn't need to know its value.
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
> On 6 Apr 2015, at 19:02, Max Toro <[hidden email]> wrote:
>
>> I have this code:
>>
>> ```xslt
>> <variable name="params" as="xs:boolean*">
>>   <apply-templates select="param" mode="#current">
>>      <with-param name="n" select="$n"/>
>>      <with-param name="d" select="$data"/>
>>   </apply-templates>
>> </variable>
>>
>> <variable name="valid" select="$is-text
>>   and not(empty($data))
>>   and (every $p in $params satisfies $p)"/>
>> ```
>>
>> When $data is empty it fails because the templates for the *param*
>> elements expect a non-empty value for *d*.
>>
>> My expectation was that, since $params is only referenced by $valid,
>> which is first testing that $data is not empty, then this wouldn't be
>> an issue.
>>
>> Am I misinterpreting how XSLT is supposed to work, or is this an issue
>> with Saxon?
>> --
>> Max Toro
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

G. Ken Holman
At 2015-04-06 13:23 -0300, Max Toro wrote:
> > A processor is allowed to use lazy evaluation but it isn't required to.
>
>Is it explicitly allowed? I couldn't find the word *lazy* in the
>XPath, XSLT and related specs.

Lazy evaluation is an aspect of implementation, not specification.  I
wouldn't expect to find it in the specifications.

>I'm disappointed I must say, I took laziness for granted, isn't it an
>important feature to make a language more declarative?

Your issue is not a laziness issue, it is your assumption that the
operators of the boolean expression are evaluated in order as was
true in XSLT 1.0.  You asked for an "explicit" specification and,
indeed, it is explicit in XSLT 2.0:

  http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
  "If
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
1.0 compatibility mode is false, the order in which the operands
   of a logical expression are evaluated is
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
"

Thus, as a stylesheet writer, you cannot rely on the order of
expression evaluation.

>Now I have to fill my code with `<xsl:choose>`.

That may be, but it isn't at all related to lazy expression
evaluation and it isn't the fault of any implementation.  The spec
explicitly says you cannot rely on the order of evaluation of the
expression so you have to write your expressions accordingly.

I hope this helps.

. . . . . . . . Ken


--
Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
G. Ken Holman                    mailto:[hidden email] |
Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |


---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Michael Kay
In reply to this post by max toro q


>> A processor is allowed to use lazy evaluation but it isn't required to.
>
> Is it explicitly allowed? I couldn't find the word *lazy* in the
> XPath, XSLT and related specs.

Everything is allowed if it gives the right answer. The spec only says what the right answer is, it doesn't say what techniques processors may use to achieve it.
>
> I'm disappointed I must say, I took laziness for granted, isn't it an
> important feature to make a language more declarative?

Lazy evaluation is largely a technique to deliver the right answer more quickly. However, it can also cause or prevent errors, to the extent that the detection of errors may depend on order of evaluation. XPath (in its "errors and optimization" section) has a fair bit to say about what processors are (or are not) allowed to do to optimize execution if this changes the detection of errors. It doesn't discuss specific optimization techniques, only the observable effects that these may cause. And generally it's pretty liberal.

You've been a little unlucky in this case, because Saxon tries to be careful in the optimizations it attempts. It tries to avoid some things that would be legal but irritating, like aggressive loop-lifting that could trigger unexpected dynamic errors. Because you haven't given us full disclosure of your code, we don't actually know the details of what happened in this particular instance.

Michael Kay
Saxonica
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

max toro q
In reply to this post by G. Ken Holman
> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.

OK, so I tried using conditional expressions instead:

```xslt
<variable name="valid" select="
   if ($is-text) then
      if (not(empty($data))) then
         (every $p in $params satisfies $p)
      else false()
   else false()"/>
```

...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
--
Max Toro


On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
<[hidden email]> wrote:

> At 2015-04-06 13:23 -0300, Max Toro wrote:
>> > A processor is allowed to use lazy evaluation but it isn't required to.
>>
>>Is it explicitly allowed? I couldn't find the word *lazy* in the
>>XPath, XSLT and related specs.
>
> Lazy evaluation is an aspect of implementation, not specification.  I
> wouldn't expect to find it in the specifications.
>
>>I'm disappointed I must say, I took laziness for granted, isn't it an
>>important feature to make a language more declarative?
>
> Your issue is not a laziness issue, it is your assumption that the
> operators of the boolean expression are evaluated in order as was
> true in XSLT 1.0.  You asked for an "explicit" specification and,
> indeed, it is explicit in XSLT 2.0:
>
>   http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>   "If
> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
> 1.0 compatibility mode is false, the order in which the operands
>    of a logical expression are evaluated is
> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
> "
>
> Thus, as a stylesheet writer, you cannot rely on the order of
> expression evaluation.
>
>>Now I have to fill my code with `<xsl:choose>`.
>
> That may be, but it isn't at all related to lazy expression
> evaluation and it isn't the fault of any implementation.  The spec
> explicitly says you cannot rely on the order of evaluation of the
> expression so you have to write your expressions accordingly.
>
> I hope this helps.
>
> . . . . . . . . Ken
>
>
> --
> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
> G. Ken Holman                    mailto:[hidden email] |
> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> http://www.avast.com
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Michael Kay
Please provide a repro: a complete self-contained test that others can execute. Then we can find out what is really going on.

Michael Kay
Saxonica
[hidden email]
+44 (0) 118 946 5893




On 7 Apr 2015, at 23:54, Max Toro <[hidden email]> wrote:

>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>
> OK, so I tried using conditional expressions instead:
>
> ```xslt
> <variable name="valid" select="
>   if ($is-text) then
>      if (not(empty($data))) then
>         (every $p in $params satisfies $p)
>      else false()
>   else false()"/>
> ```
>
> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
> --
> Max Toro
>
>
> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
> <[hidden email]> wrote:
>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>>> A processor is allowed to use lazy evaluation but it isn't required to.
>>>
>>> Is it explicitly allowed? I couldn't find the word *lazy* in the
>>> XPath, XSLT and related specs.
>>
>> Lazy evaluation is an aspect of implementation, not specification.  I
>> wouldn't expect to find it in the specifications.
>>
>>> I'm disappointed I must say, I took laziness for granted, isn't it an
>>> important feature to make a language more declarative?
>>
>> Your issue is not a laziness issue, it is your assumption that the
>> operators of the boolean expression are evaluated in order as was
>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>> indeed, it is explicit in XSLT 2.0:
>>
>>  http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>  "If
>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>> 1.0 compatibility mode is false, the order in which the operands
>>   of a logical expression are evaluated is
>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>> "
>>
>> Thus, as a stylesheet writer, you cannot rely on the order of
>> expression evaluation.
>>
>>> Now I have to fill my code with `<xsl:choose>`.
>>
>> That may be, but it isn't at all related to lazy expression
>> evaluation and it isn't the fault of any implementation.  The spec
>> explicitly says you cannot rely on the order of evaluation of the
>> expression so you have to write your expressions accordingly.
>>
>> I hope this helps.
>>
>> . . . . . . . . Ken
>>
>>
>> --
>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>> G. Ken Holman                    mailto:[hidden email] |
>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> http://www.avast.com
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Dimitre Novatchev
In reply to this post by max toro q
Hi Max,

Try producing $params by a function and use in your nested conditional
expression something like this:

 (every $p in my:getParams() satisfies $p)



On Tue, Apr 7, 2015 at 3:54 PM, Max Toro <[hidden email]> wrote:

>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>
> OK, so I tried using conditional expressions instead:
>
> ```xslt
> <variable name="valid" select="
>    if ($is-text) then
>       if (not(empty($data))) then
>          (every $p in $params satisfies $p)
>       else false()
>    else false()"/>
> ```
>
> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
> --
> Max Toro
>
>
> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
> <[hidden email]> wrote:
>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>> > A processor is allowed to use lazy evaluation but it isn't required to.
>>>
>>>Is it explicitly allowed? I couldn't find the word *lazy* in the
>>>XPath, XSLT and related specs.
>>
>> Lazy evaluation is an aspect of implementation, not specification.  I
>> wouldn't expect to find it in the specifications.
>>
>>>I'm disappointed I must say, I took laziness for granted, isn't it an
>>>important feature to make a language more declarative?
>>
>> Your issue is not a laziness issue, it is your assumption that the
>> operators of the boolean expression are evaluated in order as was
>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>> indeed, it is explicit in XSLT 2.0:
>>
>>   http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>   "If
>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>> 1.0 compatibility mode is false, the order in which the operands
>>    of a logical expression are evaluated is
>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>> "
>>
>> Thus, as a stylesheet writer, you cannot rely on the order of
>> expression evaluation.
>>
>>>Now I have to fill my code with `<xsl:choose>`.
>>
>> That may be, but it isn't at all related to lazy expression
>> evaluation and it isn't the fault of any implementation.  The spec
>> explicitly says you cannot rely on the order of evaluation of the
>> expression so you have to write your expressions accordingly.
>>
>> I hope this helps.
>>
>> . . . . . . . . Ken
>>
>>
>> --
>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>> G. Ken Holman                    mailto:[hidden email] |
>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>
>>
>> ---
>> This email has been checked for viruses by Avast antivirus software.
>> http://www.avast.com
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help



--
Cheers,
Dimitre Novatchev
---------------------------------------
Truly great madness cannot be achieved without significant intelligence.
---------------------------------------
To invent, you need a good imagination and a pile of junk
-------------------------------------
Never fight an inanimate object
-------------------------------------
To avoid situations in which you might make mistakes may be the
biggest mistake of all
------------------------------------
Quality means doing it right when no one is looking.
-------------------------------------
You've achieved success in your field when you don't know whether what
you're doing is work or play
-------------------------------------
To achieve the impossible dream, try going to sleep.
-------------------------------------
Facts do not cease to exist because they are ignored.
-------------------------------------
Typing monkeys will write all Shakespeare's works in 200yrs.Will they
write all patents, too? :)
-------------------------------------
I finally figured out the only reason to be alive is to enjoy it.

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

max toro q
In reply to this post by Michael Kay
I found out that this is not an issue on Saxon (N) 9.5.x, but it is on 9.6.x:

```shell
C:\Temp> D:\lib\saxonhe\n\9.6.0.5\bin\Transform.exe .\repo.xml .\repo.xsl
Error on line 32 of repo.xsl:
  XTTE0590: An empty sequence is not allowed as the value of parameter $d
  at xsl:apply-templates (file:/C:/Temp/./repo.xsl#14)
     processing /data/param[1]
  in built-in template rule
An empty sequence is not allowed as the value of parameter $d
C:\Temp>
C:\Temp> D:\lib\saxonhe\n\9.5.1.8\bin\Transform.exe .\repo.xml .\repo.xsl
<?xml version="1.0" encoding="UTF-8"?>false
```

Here's the repo:

```xslt
<?xml version="1.0" encoding="utf-8" ?>
<stylesheet version="2.0" exclude-result-prefixes="#all"
   xmlns="http://www.w3.org/1999/XSL/Transform"
   xmlns:xs="http://www.w3.org/2001/XMLSchema"
   xmlns:local="local">

   <template match="data">
      <param name="n" as="node()">foo</param>

      <variable name="is-text" select="$n instance of text()"/>
      <variable name="data" select="local:parse-atomic-type(@type,
string($n))"/>

      <variable name="params" as="xs:boolean*">
         <apply-templates select="param" mode="#current">
            <with-param name="n" select="$n"/>
            <with-param name="d" select="$data"/>
         </apply-templates>
      </variable>

      <variable name="valid" select="
         if ($is-text) then
            if (not(empty($data))) then
               (every $p in $params satisfies $p)
            else false()
         else false()
      "/>

      <sequence select="$valid"/>
   </template>

   <template match="data/param[@name = 'minInclusive']">
      <param name="d" as="xs:anyAtomicType"/>

      <sequence select="$d ge local:parse-atomic-type(../@type, string())"/>
   </template>

   <template match="data/param[@name = 'maxInclusive']">
      <param name="d" as="xs:anyAtomicType"/>

      <sequence select="$d le local:parse-atomic-type(../@type, string())"/>
   </template>

   <function name="local:parse-atomic-type" as="xs:anyAtomicType?">
      <param name="local-name" as="xs:string"/>
      <param name="val" as="xs:string"/>

      <sequence select="
         if ($local-name eq 'double') then ($val cast as
xs:double)[$val castable as xs:double]
         else error((), concat('The type ', $local-name, ' is not supported.'))
      "/>
   </function>

</stylesheet>
```

```xml
<?xml version="1.0" encoding="utf-8" ?>
<data type="double">
   <param name="minInclusive">0</param>
   <param name="maxInclusive">1</param>
</data>
```

--
Max Toro


On Tue, Apr 7, 2015 at 8:17 PM, Michael Kay <[hidden email]> wrote:

> Please provide a repro: a complete self-contained test that others can execute. Then we can find out what is really going on.
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
> On 7 Apr 2015, at 23:54, Max Toro <[hidden email]> wrote:
>
>>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>>
>> OK, so I tried using conditional expressions instead:
>>
>> ```xslt
>> <variable name="valid" select="
>>   if ($is-text) then
>>      if (not(empty($data))) then
>>         (every $p in $params satisfies $p)
>>      else false()
>>   else false()"/>
>> ```
>>
>> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
>> --
>> Max Toro
>>
>>
>> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
>> <[hidden email]> wrote:
>>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>>>> A processor is allowed to use lazy evaluation but it isn't required to.
>>>>
>>>> Is it explicitly allowed? I couldn't find the word *lazy* in the
>>>> XPath, XSLT and related specs.
>>>
>>> Lazy evaluation is an aspect of implementation, not specification.  I
>>> wouldn't expect to find it in the specifications.
>>>
>>>> I'm disappointed I must say, I took laziness for granted, isn't it an
>>>> important feature to make a language more declarative?
>>>
>>> Your issue is not a laziness issue, it is your assumption that the
>>> operators of the boolean expression are evaluated in order as was
>>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>>> indeed, it is explicit in XSLT 2.0:
>>>
>>>  http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>>  "If
>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>>> 1.0 compatibility mode is false, the order in which the operands
>>>   of a logical expression are evaluated is
>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>>> "
>>>
>>> Thus, as a stylesheet writer, you cannot rely on the order of
>>> expression evaluation.
>>>
>>>> Now I have to fill my code with `<xsl:choose>`.
>>>
>>> That may be, but it isn't at all related to lazy expression
>>> evaluation and it isn't the fault of any implementation.  The spec
>>> explicitly says you cannot rely on the order of evaluation of the
>>> expression so you have to write your expressions accordingly.
>>>
>>> I hope this helps.
>>>
>>> . . . . . . . . Ken
>>>
>>>
>>> --
>>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>>> G. Ken Holman                    mailto:[hidden email] |
>>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>>
>>>
>>> ---
>>> This email has been checked for viruses by Avast antivirus software.
>>> http://www.avast.com
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Michael Kay
Thanks.

First of all, you're quite lucky to get away with this:

> ($val cast as xs:double)[$val castable as xs:double]

Without optimizations, this would give you a dynamic error in the case where the value isn't castable as xs:double. It's only giving you an empty sequence because Saxon is performing (permitted) optimizations.

Secondly, you're correct in deducing that $params is not being lazily evaluated. Saxon has decided that the value of the variable depends on the context item and this makes lazy evaluation impossible or uneconomical.

In fact I wouldn't expect lazy evaluation here (because of the context dependency), but I would expect $params to be inlined, which has a very similar effect. Inlining of a variable normally happens when there is only one reference to the variable, which isn't in a loop, and where the context is the same between the variable declaration and the variable reference.  I'll look into it further when I get time.

The variables $is-text and $valid are successfully inlined.

The bottom line, however, is that you can't rely on such optimizations to eliminate dynamic errors in your code.


Michael Kay
Saxonica
[hidden email]
+44 (0) 118 946 5893




On 8 Apr 2015, at 05:24, Max Toro <[hidden email]> wrote:

> I found out that this is not an issue on Saxon (N) 9.5.x, but it is on 9.6.x:
>
> ```shell
> C:\Temp> D:\lib\saxonhe\n\9.6.0.5\bin\Transform.exe .\repo.xml .\repo.xsl
> Error on line 32 of repo.xsl:
>  XTTE0590: An empty sequence is not allowed as the value of parameter $d
>  at xsl:apply-templates (file:/C:/Temp/./repo.xsl#14)
>     processing /data/param[1]
>  in built-in template rule
> An empty sequence is not allowed as the value of parameter $d
> C:\Temp>
> C:\Temp> D:\lib\saxonhe\n\9.5.1.8\bin\Transform.exe .\repo.xml .\repo.xsl
> <?xml version="1.0" encoding="UTF-8"?>false
> ```
>
> Here's the repo:
>
> ```xslt
> <?xml version="1.0" encoding="utf-8" ?>
> <stylesheet version="2.0" exclude-result-prefixes="#all"
>   xmlns="http://www.w3.org/1999/XSL/Transform"
>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>   xmlns:local="local">
>
>   <template match="data">
>      <param name="n" as="node()">foo</param>
>
>      <variable name="is-text" select="$n instance of text()"/>
>      <variable name="data" select="local:parse-atomic-type(@type,
> string($n))"/>
>
>      <variable name="params" as="xs:boolean*">
>         <apply-templates select="param" mode="#current">
>            <with-param name="n" select="$n"/>
>            <with-param name="d" select="$data"/>
>         </apply-templates>
>      </variable>
>
>      <variable name="valid" select="
>         if ($is-text) then
>            if (not(empty($data))) then
>               (every $p in $params satisfies $p)
>            else false()
>         else false()
>      "/>
>
>      <sequence select="$valid"/>
>   </template>
>
>   <template match="data/param[@name = 'minInclusive']">
>      <param name="d" as="xs:anyAtomicType"/>
>
>      <sequence select="$d ge local:parse-atomic-type(../@type, string())"/>
>   </template>
>
>   <template match="data/param[@name = 'maxInclusive']">
>      <param name="d" as="xs:anyAtomicType"/>
>
>      <sequence select="$d le local:parse-atomic-type(../@type, string())"/>
>   </template>
>
>   <function name="local:parse-atomic-type" as="xs:anyAtomicType?">
>      <param name="local-name" as="xs:string"/>
>      <param name="val" as="xs:string"/>
>
>      <sequence select="
>         if ($local-name eq 'double') then ($val cast as
> xs:double)[$val castable as xs:double]
>         else error((), concat('The type ', $local-name, ' is not supported.'))
>      "/>
>   </function>
>
> </stylesheet>
> ```
>
> ```xml
> <?xml version="1.0" encoding="utf-8" ?>
> <data type="double">
>   <param name="minInclusive">0</param>
>   <param name="maxInclusive">1</param>
> </data>
> ```
>
> --
> Max Toro
>
>
> On Tue, Apr 7, 2015 at 8:17 PM, Michael Kay <[hidden email]> wrote:
>> Please provide a repro: a complete self-contained test that others can execute. Then we can find out what is really going on.
>>
>> Michael Kay
>> Saxonica
>> [hidden email]
>> +44 (0) 118 946 5893
>>
>>
>>
>>
>> On 7 Apr 2015, at 23:54, Max Toro <[hidden email]> wrote:
>>
>>>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>>>
>>> OK, so I tried using conditional expressions instead:
>>>
>>> ```xslt
>>> <variable name="valid" select="
>>>  if ($is-text) then
>>>     if (not(empty($data))) then
>>>        (every $p in $params satisfies $p)
>>>     else false()
>>>  else false()"/>
>>> ```
>>>
>>> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
>>> --
>>> Max Toro
>>>
>>>
>>> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
>>> <[hidden email]> wrote:
>>>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>>>>> A processor is allowed to use lazy evaluation but it isn't required to.
>>>>>
>>>>> Is it explicitly allowed? I couldn't find the word *lazy* in the
>>>>> XPath, XSLT and related specs.
>>>>
>>>> Lazy evaluation is an aspect of implementation, not specification.  I
>>>> wouldn't expect to find it in the specifications.
>>>>
>>>>> I'm disappointed I must say, I took laziness for granted, isn't it an
>>>>> important feature to make a language more declarative?
>>>>
>>>> Your issue is not a laziness issue, it is your assumption that the
>>>> operators of the boolean expression are evaluated in order as was
>>>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>>>> indeed, it is explicit in XSLT 2.0:
>>>>
>>>> http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>>> "If
>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>>>> 1.0 compatibility mode is false, the order in which the operands
>>>>  of a logical expression are evaluated is
>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>>>> "
>>>>
>>>> Thus, as a stylesheet writer, you cannot rely on the order of
>>>> expression evaluation.
>>>>
>>>>> Now I have to fill my code with `<xsl:choose>`.
>>>>
>>>> That may be, but it isn't at all related to lazy expression
>>>> evaluation and it isn't the fault of any implementation.  The spec
>>>> explicitly says you cannot rely on the order of evaluation of the
>>>> expression so you have to write your expressions accordingly.
>>>>
>>>> I hope this helps.
>>>>
>>>> . . . . . . . . Ken
>>>>
>>>>
>>>> --
>>>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>>>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>>>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>>>> G. Ken Holman                    mailto:[hidden email] |
>>>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>>>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>>>
>>>>
>>>> ---
>>>> This email has been checked for viruses by Avast antivirus software.
>>>> http://www.avast.com
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>>> Develop your own process in accordance with the BPMN 2 standard
>>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>>> _______________________________________________
>>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

max toro q
Thank you Michael. Lots of lessons learned.
--
Max Toro


On Wed, Apr 8, 2015 at 4:24 AM, Michael Kay <[hidden email]> wrote:

> Thanks.
>
> First of all, you're quite lucky to get away with this:
>
>> ($val cast as xs:double)[$val castable as xs:double]
>
> Without optimizations, this would give you a dynamic error in the case where the value isn't castable as xs:double. It's only giving you an empty sequence because Saxon is performing (permitted) optimizations.
>
> Secondly, you're correct in deducing that $params is not being lazily evaluated. Saxon has decided that the value of the variable depends on the context item and this makes lazy evaluation impossible or uneconomical.
>
> In fact I wouldn't expect lazy evaluation here (because of the context dependency), but I would expect $params to be inlined, which has a very similar effect. Inlining of a variable normally happens when there is only one reference to the variable, which isn't in a loop, and where the context is the same between the variable declaration and the variable reference.  I'll look into it further when I get time.
>
> The variables $is-text and $valid are successfully inlined.
>
> The bottom line, however, is that you can't rely on such optimizations to eliminate dynamic errors in your code.
>
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
> On 8 Apr 2015, at 05:24, Max Toro <[hidden email]> wrote:
>
>> I found out that this is not an issue on Saxon (N) 9.5.x, but it is on 9.6.x:
>>
>> ```shell
>> C:\Temp> D:\lib\saxonhe\n\9.6.0.5\bin\Transform.exe .\repo.xml .\repo.xsl
>> Error on line 32 of repo.xsl:
>>  XTTE0590: An empty sequence is not allowed as the value of parameter $d
>>  at xsl:apply-templates (file:/C:/Temp/./repo.xsl#14)
>>     processing /data/param[1]
>>  in built-in template rule
>> An empty sequence is not allowed as the value of parameter $d
>> C:\Temp>
>> C:\Temp> D:\lib\saxonhe\n\9.5.1.8\bin\Transform.exe .\repo.xml .\repo.xsl
>> <?xml version="1.0" encoding="UTF-8"?>false
>> ```
>>
>> Here's the repo:
>>
>> ```xslt
>> <?xml version="1.0" encoding="utf-8" ?>
>> <stylesheet version="2.0" exclude-result-prefixes="#all"
>>   xmlns="http://www.w3.org/1999/XSL/Transform"
>>   xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>   xmlns:local="local">
>>
>>   <template match="data">
>>      <param name="n" as="node()">foo</param>
>>
>>      <variable name="is-text" select="$n instance of text()"/>
>>      <variable name="data" select="local:parse-atomic-type(@type,
>> string($n))"/>
>>
>>      <variable name="params" as="xs:boolean*">
>>         <apply-templates select="param" mode="#current">
>>            <with-param name="n" select="$n"/>
>>            <with-param name="d" select="$data"/>
>>         </apply-templates>
>>      </variable>
>>
>>      <variable name="valid" select="
>>         if ($is-text) then
>>            if (not(empty($data))) then
>>               (every $p in $params satisfies $p)
>>            else false()
>>         else false()
>>      "/>
>>
>>      <sequence select="$valid"/>
>>   </template>
>>
>>   <template match="data/param[@name = 'minInclusive']">
>>      <param name="d" as="xs:anyAtomicType"/>
>>
>>      <sequence select="$d ge local:parse-atomic-type(../@type, string())"/>
>>   </template>
>>
>>   <template match="data/param[@name = 'maxInclusive']">
>>      <param name="d" as="xs:anyAtomicType"/>
>>
>>      <sequence select="$d le local:parse-atomic-type(../@type, string())"/>
>>   </template>
>>
>>   <function name="local:parse-atomic-type" as="xs:anyAtomicType?">
>>      <param name="local-name" as="xs:string"/>
>>      <param name="val" as="xs:string"/>
>>
>>      <sequence select="
>>         if ($local-name eq 'double') then ($val cast as
>> xs:double)[$val castable as xs:double]
>>         else error((), concat('The type ', $local-name, ' is not supported.'))
>>      "/>
>>   </function>
>>
>> </stylesheet>
>> ```
>>
>> ```xml
>> <?xml version="1.0" encoding="utf-8" ?>
>> <data type="double">
>>   <param name="minInclusive">0</param>
>>   <param name="maxInclusive">1</param>
>> </data>
>> ```
>>
>> --
>> Max Toro
>>
>>
>> On Tue, Apr 7, 2015 at 8:17 PM, Michael Kay <[hidden email]> wrote:
>>> Please provide a repro: a complete self-contained test that others can execute. Then we can find out what is really going on.
>>>
>>> Michael Kay
>>> Saxonica
>>> [hidden email]
>>> +44 (0) 118 946 5893
>>>
>>>
>>>
>>>
>>> On 7 Apr 2015, at 23:54, Max Toro <[hidden email]> wrote:
>>>
>>>>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>>>>
>>>> OK, so I tried using conditional expressions instead:
>>>>
>>>> ```xslt
>>>> <variable name="valid" select="
>>>>  if ($is-text) then
>>>>     if (not(empty($data))) then
>>>>        (every $p in $params satisfies $p)
>>>>     else false()
>>>>  else false()"/>
>>>> ```
>>>>
>>>> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
>>>> --
>>>> Max Toro
>>>>
>>>>
>>>> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
>>>> <[hidden email]> wrote:
>>>>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>>>>>> A processor is allowed to use lazy evaluation but it isn't required to.
>>>>>>
>>>>>> Is it explicitly allowed? I couldn't find the word *lazy* in the
>>>>>> XPath, XSLT and related specs.
>>>>>
>>>>> Lazy evaluation is an aspect of implementation, not specification.  I
>>>>> wouldn't expect to find it in the specifications.
>>>>>
>>>>>> I'm disappointed I must say, I took laziness for granted, isn't it an
>>>>>> important feature to make a language more declarative?
>>>>>
>>>>> Your issue is not a laziness issue, it is your assumption that the
>>>>> operators of the boolean expression are evaluated in order as was
>>>>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>>>>> indeed, it is explicit in XSLT 2.0:
>>>>>
>>>>> http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>>>> "If
>>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>>>>> 1.0 compatibility mode is false, the order in which the operands
>>>>>  of a logical expression are evaluated is
>>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>>>>> "
>>>>>
>>>>> Thus, as a stylesheet writer, you cannot rely on the order of
>>>>> expression evaluation.
>>>>>
>>>>>> Now I have to fill my code with `<xsl:choose>`.
>>>>>
>>>>> That may be, but it isn't at all related to lazy expression
>>>>> evaluation and it isn't the fault of any implementation.  The spec
>>>>> explicitly says you cannot rely on the order of evaluation of the
>>>>> expression so you have to write your expressions accordingly.
>>>>>
>>>>> I hope this helps.
>>>>>
>>>>> . . . . . . . . Ken
>>>>>
>>>>>
>>>>> --
>>>>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>>>>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>>>>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>>>>> G. Ken Holman                    mailto:[hidden email] |
>>>>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>>>>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>>>>
>>>>>
>>>>> ---
>>>>> This email has been checked for viruses by Avast antivirus software.
>>>>> http://www.avast.com
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>>>> Develop your own process in accordance with the BPMN 2 standard
>>>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>>>> _______________________________________________
>>>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>>
>>>> ------------------------------------------------------------------------------
>>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>>> Develop your own process in accordance with the BPMN 2 standard
>>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>>> _______________________________________________
>>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Lazy evaluation

Michael Kay
In reply to this post by Michael Kay
It turns out that the reason the variable isn't inlined in 9.6 is because inlining can cause a very minor non-conformance with the specification. If the apply-templates invokes a template that directly or indirectly invokes xsl:result-document, then error XTDE1480 should be reported (cannot call xsl:result-document while evaluating the initializer of a variable). But inlining the variable prevents this error being detected, because we are then no longer initializing a variable when the call on xsl:result-document happens.

It's always frustrating when such a minor technicality prevents an optimization from happening, but conformance always comes first.

Michael Kay
Saxonica
[hidden email]
+44 (0) 118 946 5893




On 8 Apr 2015, at 08:24, Michael Kay <[hidden email]> wrote:

> Thanks.
>
> First of all, you're quite lucky to get away with this:
>
>> ($val cast as xs:double)[$val castable as xs:double]
>
> Without optimizations, this would give you a dynamic error in the case where the value isn't castable as xs:double. It's only giving you an empty sequence because Saxon is performing (permitted) optimizations.
>
> Secondly, you're correct in deducing that $params is not being lazily evaluated. Saxon has decided that the value of the variable depends on the context item and this makes lazy evaluation impossible or uneconomical.
>
> In fact I wouldn't expect lazy evaluation here (because of the context dependency), but I would expect $params to be inlined, which has a very similar effect. Inlining of a variable normally happens when there is only one reference to the variable, which isn't in a loop, and where the context is the same between the variable declaration and the variable reference.  I'll look into it further when I get time.
>
> The variables $is-text and $valid are successfully inlined.
>
> The bottom line, however, is that you can't rely on such optimizations to eliminate dynamic errors in your code.
>
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
> On 8 Apr 2015, at 05:24, Max Toro <[hidden email]> wrote:
>
>> I found out that this is not an issue on Saxon (N) 9.5.x, but it is on 9.6.x:
>>
>> ```shell
>> C:\Temp> D:\lib\saxonhe\n\9.6.0.5\bin\Transform.exe .\repo.xml .\repo.xsl
>> Error on line 32 of repo.xsl:
>> XTTE0590: An empty sequence is not allowed as the value of parameter $d
>> at xsl:apply-templates (file:/C:/Temp/./repo.xsl#14)
>>    processing /data/param[1]
>> in built-in template rule
>> An empty sequence is not allowed as the value of parameter $d
>> C:\Temp>
>> C:\Temp> D:\lib\saxonhe\n\9.5.1.8\bin\Transform.exe .\repo.xml .\repo.xsl
>> <?xml version="1.0" encoding="UTF-8"?>false
>> ```
>>
>> Here's the repo:
>>
>> ```xslt
>> <?xml version="1.0" encoding="utf-8" ?>
>> <stylesheet version="2.0" exclude-result-prefixes="#all"
>>  xmlns="http://www.w3.org/1999/XSL/Transform"
>>  xmlns:xs="http://www.w3.org/2001/XMLSchema"
>>  xmlns:local="local">
>>
>>  <template match="data">
>>     <param name="n" as="node()">foo</param>
>>
>>     <variable name="is-text" select="$n instance of text()"/>
>>     <variable name="data" select="local:parse-atomic-type(@type,
>> string($n))"/>
>>
>>     <variable name="params" as="xs:boolean*">
>>        <apply-templates select="param" mode="#current">
>>           <with-param name="n" select="$n"/>
>>           <with-param name="d" select="$data"/>
>>        </apply-templates>
>>     </variable>
>>
>>     <variable name="valid" select="
>>        if ($is-text) then
>>           if (not(empty($data))) then
>>              (every $p in $params satisfies $p)
>>           else false()
>>        else false()
>>     "/>
>>
>>     <sequence select="$valid"/>
>>  </template>
>>
>>  <template match="data/param[@name = 'minInclusive']">
>>     <param name="d" as="xs:anyAtomicType"/>
>>
>>     <sequence select="$d ge local:parse-atomic-type(../@type, string())"/>
>>  </template>
>>
>>  <template match="data/param[@name = 'maxInclusive']">
>>     <param name="d" as="xs:anyAtomicType"/>
>>
>>     <sequence select="$d le local:parse-atomic-type(../@type, string())"/>
>>  </template>
>>
>>  <function name="local:parse-atomic-type" as="xs:anyAtomicType?">
>>     <param name="local-name" as="xs:string"/>
>>     <param name="val" as="xs:string"/>
>>
>>     <sequence select="
>>        if ($local-name eq 'double') then ($val cast as
>> xs:double)[$val castable as xs:double]
>>        else error((), concat('The type ', $local-name, ' is not supported.'))
>>     "/>
>>  </function>
>>
>> </stylesheet>
>> ```
>>
>> ```xml
>> <?xml version="1.0" encoding="utf-8" ?>
>> <data type="double">
>>  <param name="minInclusive">0</param>
>>  <param name="maxInclusive">1</param>
>> </data>
>> ```
>>
>> --
>> Max Toro
>>
>>
>> On Tue, Apr 7, 2015 at 8:17 PM, Michael Kay <[hidden email]> wrote:
>>> Please provide a repro: a complete self-contained test that others can execute. Then we can find out what is really going on.
>>>
>>> Michael Kay
>>> Saxonica
>>> [hidden email]
>>> +44 (0) 118 946 5893
>>>
>>>
>>>
>>>
>>> On 7 Apr 2015, at 23:54, Max Toro <[hidden email]> wrote:
>>>
>>>>> Your issue is not a laziness issue, it is your assumption that the operators of the boolean expression are evaluated in order as was true in XSLT 1.0.
>>>>
>>>> OK, so I tried using conditional expressions instead:
>>>>
>>>> ```xslt
>>>> <variable name="valid" select="
>>>> if ($is-text) then
>>>>    if (not(empty($data))) then
>>>>       (every $p in $params satisfies $p)
>>>>    else false()
>>>> else false()"/>
>>>> ```
>>>>
>>>> ...but it still fails. I'm pretty sure it's a (lack of) laziness issue.
>>>> --
>>>> Max Toro
>>>>
>>>>
>>>> On Tue, Apr 7, 2015 at 4:25 PM, G. Ken Holman
>>>> <[hidden email]> wrote:
>>>>> At 2015-04-06 13:23 -0300, Max Toro wrote:
>>>>>>> A processor is allowed to use lazy evaluation but it isn't required to.
>>>>>>
>>>>>> Is it explicitly allowed? I couldn't find the word *lazy* in the
>>>>>> XPath, XSLT and related specs.
>>>>>
>>>>> Lazy evaluation is an aspect of implementation, not specification.  I
>>>>> wouldn't expect to find it in the specifications.
>>>>>
>>>>>> I'm disappointed I must say, I took laziness for granted, isn't it an
>>>>>> important feature to make a language more declarative?
>>>>>
>>>>> Your issue is not a laziness issue, it is your assumption that the
>>>>> operators of the boolean expression are evaluated in order as was
>>>>> true in XSLT 1.0.  You asked for an "explicit" specification and,
>>>>> indeed, it is explicit in XSLT 2.0:
>>>>>
>>>>> http://www.w3.org/TR/2007/REC-xpath20-20070123/#id-logical-expressions
>>>>> "If
>>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-xpath-compat-mode>XPath
>>>>> 1.0 compatibility mode is false, the order in which the operands
>>>>> of a logical expression are evaluated is
>>>>> <http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-implementation-dependent>implementation-dependent.
>>>>> "
>>>>>
>>>>> Thus, as a stylesheet writer, you cannot rely on the order of
>>>>> expression evaluation.
>>>>>
>>>>>> Now I have to fill my code with `<xsl:choose>`.
>>>>>
>>>>> That may be, but it isn't at all related to lazy expression
>>>>> evaluation and it isn't the fault of any implementation.  The spec
>>>>> explicitly says you cannot rely on the order of evaluation of the
>>>>> expression so you have to write your expressions accordingly.
>>>>>
>>>>> I hope this helps.
>>>>>
>>>>> . . . . . . . . Ken
>>>>>
>>>>>
>>>>> --
>>>>> Check our site for free XML, XSLT, XSL-FO and UBL developer resources |
>>>>> Free 5-hour lecture:  http://www.CraneSoftwrights.com/links/video.htm |
>>>>> Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/ |
>>>>> G. Ken Holman                    mailto:[hidden email] |
>>>>> Google+ profile:       http://plus.google.com/+GKenHolman-Crane/about |
>>>>> Legal business disclaimers:     http://www.CraneSoftwrights.com/legal |
>>>>>
>>>>>
>>>>> ---
>>>>> This email has been checked for viruses by Avast antivirus software.
>>>>> http://www.avast.com
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>>>> Develop your own process in accordance with the BPMN 2 standard
>>>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>>>> _______________________________________________
>>>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>>
>>>> ------------------------------------------------------------------------------
>>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>>> Develop your own process in accordance with the BPMN 2 standard
>>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>>> _______________________________________________
>>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>>> [hidden email]
>>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>>> Develop your own process in accordance with the BPMN 2 standard
>>> Learn Process modeling best practices with Bonita BPM through live exercises
>>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>>> _______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>> ------------------------------------------------------------------------------
>> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
>> Develop your own process in accordance with the BPMN 2 standard
>> Learn Process modeling best practices with Bonita BPM through live exercises
>> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
>> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help 
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help