W3C home > Mailing lists > Public > xproc-dev@w3.org > May 2009

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

From: Costello, Roger L. <costello@mitre.org>
Date: Sat, 9 May 2009 13:07:17 -0400
To: "'xproc-dev@w3.org'" <xproc-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB5003F3FE36ED@IMCMBX3.MITRE.ORG>

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:output port="result" />
    <p:unwrap match="/BookStore" />

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.


Here's Bookstore.xml

<?xml version="1.0"?>
        <Title>My Life and Times</Title>
        <Author>Paul McCartney</Author>
        <Publisher>McMillin Publishing</Publisher>
        <Title>Illusions The Adventures of a Reluctant Messiah</Title>
        <Author>Richard Bach</Author>
        <Publisher>Dell Publishing Co.</Publisher>
        <Title>The First and Last Freedom</Title>
        <Author>J. Krishnamurti</Author>
        <Publisher>Harper &amp; Row</Publisher>
Received on Saturday, 9 May 2009 17:07:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:03:05 UTC