W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > December 2010

Re: Document Templating Steps updated

From: Norman Walsh <ndw@nwalsh.com>
Date: Mon, 20 Dec 2010 10:35:36 -0500
To: public-xml-processing-model-comments@w3.org
Message-ID: <m2lj3ksbhz.fsf@nwalsh.com>
Florent Georges <fgeorges@fgeorges.org> writes:

> By the way, how are handled whitespaces
> in the following template?:
>
>     <p:document-template>
>        <p:input port="template">
>           <p:inline>
>              <root> {
>                 /some/sub/tree
>              }
>              </root>
>           </p:inline>
>        </p:input>
>        ...
>     </p:document-template>

You'll get whitespace before <root>, a single whitespace after <root>,
the result of evaluating the expression

  "
                 /some/sub/tree
             "

which means the leading and trailing whitespace in there will be ignored,
I believe, then you'll get all the whitespace after "}" up to </root>,
and finally, the whitespace after </root>.

>   Is there a text node with one space right after the opening
> root tag, and a text node with one linefeed and whitespaces right
> before the closing root tag?

Yes.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
Lead Engineer
MarkLogic Corporation
www.marklogic.com

Received on Monday, 20 December 2010 15:36:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 20 December 2010 15:36:13 GMT