Re: Whose error is it anyway
Ihe Onwuka <[email protected]>
| Newsgroups | gmane.text.xml.saxon.help |
|---|---|
| Message-ID | <CALfs7+yhw9j1XRvY-ki9sfQNnWEXb7gEqgmd1xt4mkvK6ozR6A@mail.gmail.com> |
Happened again.
My code. <xsl:template
match="*[map:contains($actions,tokenize(.,'\W')[1][matches(.,'\i\c*')])]">
Clearly it doesn't like the zero length string.
Warning at char 1 in xsl:template/@match on line 63 column 92 of *****.xsl:
XPTY0004 An error occurred matching pattern
{element()[Q{http://www.w3.org/2005/xpath-functions/map}contains($actions,
exactly-one((first(tokenize(convertUntyped(data(.)), "\W",
"")))[matches(., "\i\c*", "")]))]}:
Error at char 9 in expression in xsl:element/@name on line 67 column 55 of
******.xsl:
XTDE0820 Supplied element name is a zero-length string
On Thu, Aug 13, 2020 at 6:40 PM Ihe Onwuka <[email protected]> wrote:
> I tried but cannot reconstruct a snippet that reproduces. The hint as to
> what happened in my use case was the best I could offer.
>
> On Thu, Aug 13, 2020 at 6:15 PM Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]> wrote:
>
>> If you post a repro that we can run, that's useful as we can examine the
>> error messages, see what's causing them, and test any improvements. With
>> only snippets like this, there's not really any effective action we can
>> take.
>>
>> Michael Kay
>> Saxonica
>>
>> On 13 Aug 2020, at 18:53, Ihe Onwuka <[email protected]> wrote:
>>
>> I can tell you that the error went away when I eliminated the possibility
>> of the context element being empty. I struggle to correlate that back to
>> the error message that was displayed.
>>
>> On Thu, Aug 13, 2020 at 10:16 AM Graydon <[email protected]> wrote:
>>
>>> Both? The hints about what the optimizer thinks is happening are useful
>>> right up until I can't tell where the error is.
>>>
>>> On August 13, 2020 1:40:48 PM UTC, Michael Kay <mike-JkSD5nQpfvpWk0Htik3J/[email protected]>
>>> wrote:
>>> >Yes, we should probably retain the original pattern as a string rather
>>> >than trying to reconstitute it from the compiled form.
>>> >
>>> >Michael Kay
>>> >Saxonica
>>> >
>>> >> On 13 Aug 2020, at 13:52, Ihe Onwuka <[email protected]> wrote:
>>> >>
>>> >> This is not my code.
>>> >>
>>> >> Warning at char 1 in xsl:template/@match on line 62 column 72 of
>>> >******.xsl:
>>> >> XPTY0004 An error occurred matching pattern
>>> >>
>>> >{element()[Q{
>>> http://www.w3.org/2005/xpath-functions/map}contains($actions
>>> ><http://www.w3.org/2005/xpath-functions/map%7Dcontains($actions>,
>>> >> exactly-one(first(tokenize(convertUntyped(data(.)), "\s", ""))))]}:
>>> >>
>>> >> My code was
>>> >>
>>> >>
>>> >> <xsl:template
>>> >match="*[map:contains($actions,tokenize(.,'\s')[1])]">
>>> >> _______________________________________________
>>> >> saxon-help mailing list archived at http://saxon.markmail.org/
>>> >> [email protected]
>>> >> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>> >
>>> >_______________________________________________
>>> >saxon-help mailing list archived at http://saxon.markmail.org/
>>> >[email protected]
>>> >https://lists.sourceforge.net/lists/listinfo/saxon-help
>>>
>>> -- Sent from my p≡p for
>>> Android._______________________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>>
>>
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[email protected]
https://lists.sourceforge.net/lists/listinfo/saxon-help