Re: p:exec -- can it apply to only selected parts of input using a loop?

Here is my first viewport to convert the contents of chunk to xhtml

         <p:viewport match="//html/content/chunk">
             <p:unescape-markup>
               <p:with-option name="content-type" select="text/html"/>
             </p:unescape-markup>
            </p:viewport>



On Wed, Feb 2, 2011 at 1:48 PM, Alex Muir <alex.g.muir@gmail.com> wrote:

>
> I was under the impression from the http://www.w3.org/TR/xproc/#p.viewportthat it was solely used for modifying nodes in a document but I suppose
> within a subpipline in the viewport one can do what one wants with the
> selected nodes such as,, store,, http-request and not change the selected
> nodes at all.  Cool..
>
> Well name aside I vote the xproc dev list could use some more examples of
> viewport being used.
>
> Regards
> Alex
>
>
>
>
>
> On Wed, Feb 2, 2011 at 1:14 PM, Jostein Austvik Jacobsen <
> josteinaj@gmail.com> wrote:
>
>> Also, viewports are useful for other stuff than just modifying a document.
>>
>> For instance, what if you wanted to store all HTML elements as separate
>> HTML files but ignore all TEXT elements? in this case p:modifySubtree
>> and p:modifyNode wouldn't be meaningful.
>>
>> I look at p:viewport as a kind of advanced version of p:for-each. If it
>> had to be renamed, then maybe p:for-each-match ?
>>
>> Anyway, I like "p:viewport" - both the step and it's name :)
>>
>> Regards
>> p:viewport-fan
>>
>> 2011/2/2 <vojtech.toman@emc.com>
>>
>> > Vojtech,, although I understand your points fully they
>>> > speak to me that viewport is talking about something
>>> > other than xml documents.
>>>
>>> Yes, the original viewport definition(s) may be unrelated to XML, but
>>> that does not mean we cannot take existing concepts and apply them to XML,
>>> or to any other area.
>>>
>>> Regards,
>>> Viewport :)
>>>
>>>
>>> --
>>> Vojtech Toman
>>> Consultant Software Engineer
>>> EMC | Information Intelligence Group
>>> vojtech.toman@emc.com
>>> http://developer.emc.com/xmltech
>>>
>>>
>>>
>>>
>>
>
>
> --
> Alex
> -----
> Currently:
> Freelance Software Engineer 6+ yrs exp
>  <http://www.facebook.com/pages/Bafila/125611807494851>
> Previously:
> https://sites.google.com/a/utg.edu.gm/alex/
>
>
> A Bafila, is two rivers flowing together as one:
> http://www.facebook.com/pages/Bafila/125611807494851
>
>
>
>


-- 
Alex
-----
Currently:
Freelance Software Engineer 6+ yrs exp
<http://www.facebook.com/pages/Bafila/125611807494851>
Previously:
https://sites.google.com/a/utg.edu.gm/alex/


A Bafila, is two rivers flowing together as one:
http://www.facebook.com/pages/Bafila/125611807494851

Received on Wednesday, 2 February 2011 14:17:07 UTC