Re: ACTION A-642-04

Hi Michael,

>
> Benito, I think that the use of has-children() was probably me, and 
> I'll happily fix it if you tell me where it is.


here it is:
     <test-case name="parse-xml-fragment-007">
         <description>parse-xml-fragment test - multiple elements are 
OK</description>
         <created by="Michael Kay, Saxonica" on="2012-07-05"/>
         <modified by="Michael Kay" on="2016-05-03" change="avoid 
assert-xml on ill-formed fragments"/>
         <environment name="empty"/>
<test><![CDATA[parse-xml-fragment("<a/><b/><c/>")]]></test>
         <result>
             <all-of>
<assert>$result/*[1][self::a][not(has-children(.))]</assert>
<assert>$result/*[2][self::b][not(has-children(.))]</assert>
<assert>$result/*[3][self::c][not(has-children(.))]</assert>
                 <assert>count($result/node()) = 3</assert>
             </all-of>
         </result>
     </test-case>


Cheers,
Benito



On 05/05/2016 12:52 PM, Michael Kay wrote:
> I think it would be best if we stick to XPath 2.0 for assertions if 
> possible. For example when we convert QT3 tests to XSLT tests it's 
> useful to know that the assertions are XPath.
>
> Saying that it's either XPath or XQuery doesn't really work because 
> they handle ampersands differently; if we allow either we would need 
> to define a way of saying which is in use for a particular assertion. 
> We could have a rule that says the assertion must be processable using 
> the same host language as the test query if people really want that.
>
> Benito, I think that the use of has-children() was probably me, and 
> I'll happily fix it if you tell me where it is.
>
> Mike
>
>> On 5 May 2016, at 09:34, Benito van der Zander <benito@benibela.de 
>> <mailto:benito@benibela.de>> wrote:
>>
>> Hi,
>> I have actually been running all the asserts (<=3.0) as XPath 2 
>> expressions
>>
>> Just fails now, because someone added a has-children assert
>>
>> Best,
>> Benito
>>
>>
>>
>> On 05/05/2016 05:39 AM, Josh Spiegel wrote:
>>> I’m not sure why there would be such a restriction.  However, I 
>>> don’t mind tweaking the assertions.  Is XQuery allowed in <assert>?
>>>
>>> Thanks,
>>> Josh
>>>
>>>> On May 4, 2016, at 4:38 PM, Michael Kay <mike@saxonica.com 
>>>> <mailto:mike@saxonica.com>> wrote:
>>>>
>>>> Oh dear.
>>>>
>>>> -s:prod-MapConstructor -t:MapConstructor-034
>>>> net.sf.saxon.s9api.SaxonApiException: Unexpected token "<" at start 
>>>> of expression
>>>> at 
>>>> net.sf.saxon.s9api.XPathCompiler.internalCompile(XPathCompiler.java:509)
>>>>
>>>> Seems you've broken an unwritten rule that the expression in 
>>>> assert-deep-eq can be parsed as an XPath expression ...
>>>>
>>>> Michael Kay
>>>> Saxonica
>>>>
>>>>
>>>>> On 4 May 2016, at 20:59, Josh Spiegel <josh.spiegel@oracle.com 
>>>>> <mailto:josh.spiegel@oracle.com>> wrote:
>>>>>
>>>>>> ACTION A-642-04 Josh to create test cases for NCName:* change to 
>>>>>> 1b in
>>>>>> https://lists.w3.org/Archives/Public/public-xsl-query/2016Mar/0035.html
>>>>>
>>>>> I have added new test cases to prod/MapConstructor.xml.  Good luck!
>>>>>
>>>>> Josh
>>>>
>>>
>>
>

Received on Thursday, 5 May 2016 11:31:44 UTC