Re: saxon-help Digest, Vol 107, Issue 1

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: saxon-help Digest, Vol 107, Issue 1

Lincoln
Please unsubscribe me. Thx

Sent from my iPhone

> On 4 Apr 2015, at 8:00 pm, [hidden email] wrote:
>
> Send saxon-help mailing list submissions to
>    [hidden email]
>
> To subscribe or unsubscribe via the World Wide Web, visit
>    https://lists.sourceforge.net/lists/listinfo/saxon-help
> or, via email, send a message with subject or body 'help' to
>    [hidden email]
>
> You can reach the person managing the list at
>    [hidden email]
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of saxon-help digest..."
>
>
> Today's Topics:
>
>   1. pooling Transformer objects? (Nowakowski, Mateusz)
>   2. white space issue, xhtml output (Rob Koberg)
>   3. Re: pooling Transformer objects? (Michael Kay)
>   4. Re: white space issue, xhtml output (Michael Kay)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 3 Apr 2015 12:33:20 +0100
> From: "Nowakowski, Mateusz" <[hidden email]>
> Subject: [saxon] pooling Transformer objects?
> To: Mailing list for the SAXON XSLT and XQuery processor
>    <[hidden email]>
> Message-ID:
>    <[hidden email]>
>    
> Content-Type: text/plain; charset="us-ascii"
>
> Hi,
>
> Recently I'm migrating to latest Camel XSLT version and I saw that they pool of Transformer objects and after transformation they reset it and put the pool.
>
>
> I dig into Saxon's  TemplatesImpl.newTransformer() and it is not rally clear for me that it makes sense.
>
> So do you recommend pooling Transformer objects?
>
> --
> Regards,
> Mateusz Nowakowski
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 2
> Date: Fri, 3 Apr 2015 08:42:46 -0700
> From: Rob Koberg <[hidden email]>
> Subject: [saxon] white space issue, xhtml output
> To: Mailing list for the SAXON XSLT and XQuery processor
>    <[hidden email]>
> Message-ID:
>    <[hidden email]>
> Content-Type: text/plain; charset=UTF-8
>
> Recently purchased and downloaded Saxon EET01 (haven't received
> license yet, but transforms are working without it -- perhaps because
> I am still only using the HE features?). I was using an old version of
> saxon9he. Since I am starting to do more and more XSL again, decided
> to to go with the full EE version for XSLT.
>
> Anyway, I have some source XML like:
>
> <p>What is an <em>expectation</em> <strong>your family has of
> you?</strong> (<em>to help with chores</em>)</p>
>
> This content gets passed through an identity transform and is
> stripping space so that the result looks like:
>
> <p>What is an <em>expectation</em><strong>your family has of
> you?</strong> (<em>to help with chores</em>)</p>
>
> Notice the "</em><strong>". I am using result-document to output
> multiple files from the much larger source XML:
>
> <xsl:result-document href="{$base-out-path}{$path}" method="xhtml"
> use-character-maps="chars" indent="no">
> ....
>
> I would have thought that using method="xhtml" would have preserved
> the space inside the "p" and between "</em> <strong>"
>
> I am using:
> <xsl:strip-space elements="*"/>
>
> If I add:
> <xsl:preserve-space elements="p li td th dt dl span strong b em i big
> small tt abbr acronym cite code dfn em kbd strong samp var a bdo br
> img map object q script span sub sup button input label select
> textarea"/>
>
> the transformation works as expected. But shouldn't an xhtml method
> transform do this for me without the need for preserve-space?
>
>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 3 Apr 2015 17:00:44 +0100
> From: Michael Kay <[hidden email]>
> Subject: Re: [saxon] pooling Transformer objects?
> To: Mailing list for the SAXON XSLT and XQuery processor
>    <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset="windows-1252"
>
> I would recommend reusing the Templates object (which represents a compiled stylesheet) but not the Transformer object. The Templates object is immutable and threadsafe.
>
> You can serially reuse the Transformer object (i.e. start one transformation in the same thread after another has finished). By default it will hold in memory the cache of documents read using the document() function, which may or may not be a good thing, but can lead to gradual increase in memory usage. You can clear this cache using transformer.reset() - but it's simpler to create a new Transformer.
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
>> On 3 Apr 2015, at 12:33, Nowakowski, Mateusz <[hidden email]> wrote:
>>
>> Hi,
>>
>> Recently I?m migrating to latest Camel XSLT version and I saw that they pool of Transformer objects and after transformation they reset it and put the pool.
>>
>> I dig into Saxon?s  TemplatesImpl.newTransformer() and it is not rally clear for me that it makes sense.
>>
>> So do you recommend pooling Transformer objects?
>>
>> --
>> Regards,
>> Mateusz Nowakowski
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/_______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Fri, 3 Apr 2015 17:03:24 +0100
> From: Michael Kay <[hidden email]>
> Subject: Re: [saxon] white space issue, xhtml output
> To: Mailing list for the SAXON XSLT and XQuery processor
>    <[hidden email]>
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> Your xsl:strip-space instruction causes all whitespace text nodes to be stripped from the input, including those you say you want to retain in the output. The fact that the output method is XHTML doesn't affect what happens to the input.
>
> Michael Kay
> Saxonica
> [hidden email]
> +44 (0) 118 946 5893
>
>
>
>
>> On 3 Apr 2015, at 16:42, Rob Koberg <[hidden email]> wrote:
>>
>> Recently purchased and downloaded Saxon EET01 (haven't received
>> license yet, but transforms are working without it -- perhaps because
>> I am still only using the HE features?). I was using an old version of
>> saxon9he. Since I am starting to do more and more XSL again, decided
>> to to go with the full EE version for XSLT.
>>
>> Anyway, I have some source XML like:
>>
>> <p>What is an <em>expectation</em> <strong>your family has of
>> you?</strong> (<em>to help with chores</em>)</p>
>>
>> This content gets passed through an identity transform and is
>> stripping space so that the result looks like:
>>
>> <p>What is an <em>expectation</em><strong>your family has of
>> you?</strong> (<em>to help with chores</em>)</p>
>>
>> Notice the "</em><strong>". I am using result-document to output
>> multiple files from the much larger source XML:
>>
>> <xsl:result-document href="{$base-out-path}{$path}" method="xhtml"
>> use-character-maps="chars" indent="no">
>> ....
>>
>> I would have thought that using method="xhtml" would have preserved
>> the space inside the "p" and between "</em> <strong>"
>>
>> I am using:
>> <xsl:strip-space elements="*"/>
>>
>> If I add:
>> <xsl:preserve-space elements="p li td th dt dl span strong b em i big
>> small tt abbr acronym cite code dfn em kbd strong samp var a bdo br
>> img map object q script span sub sup button input label select
>> textarea"/>
>>
>> the transformation works as expected. But shouldn't an xhtml method
>> transform do this for me without the need for preserve-space?
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
>
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
>
> ------------------------------
>
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
> The saxon-help list is archived at http://saxon.markmail.org/
>
> End of saxon-help Digest, Vol 107, Issue 1
> ******************************************

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help