W3C home > Mailing lists > Public > xproc-dev@w3.org > February 2011

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

From: mozer <xmlizer@gmail.com>
Date: Wed, 2 Feb 2011 12:24:16 +0100
Message-ID: <AANLkTi=fLso+MViN=F5H7V+_p8y=G0KVbHkZGAdS+j-Q@mail.gmail.com>
To: Alex Muir <alex.g.muir@gmail.com>
Cc: Jostein Austvik Jacobsen <josteinaj@gmail.com>, XProc Dev <xproc-dev@w3.org>
Alex,

Coming up with a meaningful name is always a challenge.

Changing it so late in the game (more than 5 years after it has been
coined), is even harder

In every language, there is such instruction that has a name on which
people always trip over

p:viewport might be in this category, the question is now how can we
live with it ?

Xmlizer

On Wed, Feb 2, 2011 at 11:38 AM, Alex Muir <alex.g.muir@gmail.com> wrote:
> Thanks..
>
> btw is there a way to vote for changing the name of p:viewport
>
> I'm not certain if the graphics terminology influenced the naming or if that
> is coincidence http://en.wikipedia.org/wiki/Viewport
>
> What would a developer think p:viewport does intuitively?  If random xml
> developer not familiar with xproc was asked what they were going to do when
> viewing a port on their xml input what would they say?
>
> There may be a better term related to what is happening with the xml input
> such that a selection of the document is being modified.
>
> p:modifySubtree
> p:modifyNode
>
> Maybe p:modifyNode is the most intuitive I can come up with brainstorming
> here..
>
> Let me know your thoughts
> Regards
>
>
> On Tue, Feb 1, 2011 at 1:17 PM, Jostein Austvik Jacobsen
> <josteinaj@gmail.com> wrote:
>>
>> Initially I would look at
>> p:viewport: http://www.w3.org/TR/xproc/#p.viewport -- "It is a compound step
>> that processes a single document, applying its subpipeline to one or more
>> subtrees of the document."
>> Regards
>> Jostein
>> 2011/2/1 Alex Muir <alex.g.muir@gmail.com>
>>>
>>> I know that p:exec can be applied to a whole document within the pipeline
>>> however I'm unaware if it can be applied to one part of a document.
>>>
>>> Given an input that had multiple html documents and text documents
>>> <DOC>
>>> <TEXT id="1">
>>>    ...
>>> </TEXT>
>>> <HTML id="2">
>>>    ...
>>> </HTML>
>>> <TEXT id="3">
>>>    ...
>>> </TEXT>
>>> <HTML id="4">
>>>    ...
>>> </HTML>
>>> </DOC>
>>>
>>> Is it possible to use say within a loop apply a p:exec to only the HTML
>>> parts say with "w3m" within the p:exec resulting with a document that has
>>> the HTML parts converted into TEXT
>>>
>>> <DOC>
>>> <TEXT id="1">
>>>    ...
>>> </TEXT>
>>> <TEXT id="2">
>>>    ...
>>> </TEXT>
>>> <TEXT id="3">
>>>    ...
>>> </TEXT>
>>> <TEXTid="4">
>>>    ...
>>> </TEXT>
>>> </DOC>
>>>
>>> Regards
>>>
>>> --
>>> Alex
>>> -----
>>> Currently:
>>> Freelance Software Engineer 6+ yrs exp
>>>
>>> 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
>
> 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 11:24:49 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 2 February 2011 11:24:49 GMT