Re: Document Templating Steps updated

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 UTC