RE: Calabash error with p:unwrap? Unwrapping the input's root element doesn't generate an error

Hi,

In my interpretation, the sentence: "This step produces a single
document; if the document element is unwrapped, the result might not be
well-formed XML." means that dynamic err:XD0001 should be raised if non
well-formed XMl is produced. That is, at least, what our implementation
does.

err:XD0001: It is a dynamic error if a non-XML resource is produced on a
step output or arrives on a step input.

Regards,
Vojtech

> -----Original Message-----
> From: xproc-dev-request@w3.org 
> [mailto:xproc-dev-request@w3.org] On Behalf Of Costello, Roger L.
> Sent: Saturday, May 09, 2009 7:07 PM
> To: 'xproc-dev@w3.org'
> Subject: Calabash error with p:unwrap? Unwrapping the input's 
> root element doesn't generate an error
> 
> 
> Hi Folks,
> 
> This p:unwrap step unwraps the root element (BookStore) and 
> thus outputs a sequence:
> 
> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" 
> name="myPipeline">
>     <p:input port="source">
>         <p:document href="Bookstore.xml"/>
>     </p:input>
>     <p:output port="result" />
>     
>     <p:unwrap match="/BookStore" />
>     
> </p:declare-step>
> 
> When I run this using Calabash 0.9.9 I don't get an error 
> message. I believe that I should get an error, right?  Here's 
> what the specification says:
> 
>     This step produces a single document; 
>     if the document element is unwrapped, 
>     the result might not be well-formed XML.
> 
> /Roger
> 
> 
> Here's Bookstore.xml
> 
> <?xml version="1.0"?>
> <BookStore>
>     <Book>
>         <Title>My Life and Times</Title>
>         <Author>Paul McCartney</Author>
>         <Date>1998</Date>
>         <ISBN>1-56592-235-2</ISBN>
>         <Publisher>McMillin Publishing</Publisher>
>     </Book>
>     <Book>
>         <Title>Illusions The Adventures of a Reluctant Messiah</Title>
>         <Author>Richard Bach</Author>
>         <Date>1977</Date>
>         <ISBN>0-440-34319-4</ISBN>
>         <Publisher>Dell Publishing Co.</Publisher>
>     </Book>
>     <Book>
>         <Title>The First and Last Freedom</Title>
>         <Author>J. Krishnamurti</Author>
>         <Date>1954</Date>
>         <ISBN>0-06-064831-7</ISBN>
>         <Publisher>Harper &amp; Row</Publisher>
>     </Book>
> </BookStore>
> 
> 

Received on Monday, 11 May 2009 06:37:32 UTC