W3C home > Mailing lists > Public > xproc-dev@w3.org > November 2008

Re: calabash: p:wrap step

From: mozer <xmlizer@gmail.com>
Date: Wed, 19 Nov 2008 14:11:19 +0100
Message-ID: <21d9ade60811190511p21db2872rcd0df0a1c0a774ef@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: "XProc Dev" <xproc-dev@w3.org>

I'm ok with this one
match pattern should match also document node() to be able to have

<?xml version="1.0"?>
<?my PI?>
<my-root/>
<!-- mycomment -->

and do

<p:wrap match="/" wrapper="some_element"/>

to have as a result
<?xml version="1.0"?>
<some_element>
  <?my PI?>
  <my-root/>
  <!-- mycomment -->
</some_element>

Xmlizer

On Tue, Nov 18, 2008 at 9:54 PM, Norman Walsh <ndw@nwalsh.com> wrote:
> "James Fuller" <james.fuller.2007@gmail.com> writes:
>
>> consider
>>
>> <p:pipeline name="pipeline"
>>             xmlns:p="http://www.w3.org/ns/xproc"
>>             xmlns:my="http://www.example.org/test/mine">
>>
>>    <p:wrap match="/" wrapper="some_element"/>
>>
>> </p:pipeline>
>>
>> never seems to match any top level elements irregardless of source input ...
>>
>> is this the correct behavior or a bug ?
>
> That pipeline should raise err:XC0023:
>
>  It is a dynamic error (err:XC0023) if the [match] pattern matches
>  anything other than element, text, processing instruction, and
>  comment nodes.
>
> Perhaps that's a bug. Perhaps we should allow the match pattern to
> match document nodes as well so that you can wrap all the leading PIs,
> comments, and whitespace.
>
>                                        Be seeing you,
>                                          norm
>
> --
> Norman Walsh <ndw@nwalsh.com> | A child becomes an adult when he
> http://nwalsh.com/            | realizes he has a right not only to be
>                              | right but also to be wrong.--Thomas
>                              | Szasz
>
Received on Wednesday, 19 November 2008 13:11:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 19 November 2008 13:11:55 GMT