Re: Comparing p:delete and p:viewport

/ Innovimax SARL <innovimax@gmail.com> was heard to say:
| I started from the fact that
|
| <p:delete>
| <p:option name="match" value="##pattern"/>
| </p:delete>
|
| should be equivalent to
|
| <p:viewport match="##pattern">
| <p:output port="result"/>
| </p:viewport>

Whether the viewport uses them or not, the matches are wrapped in a
document and provided on #current, so p:viewport cannot match nodes
that can't be in an XML document.

Delete doesn't have that restriction, so there's no reason why its
pattern can't match attributes.

| And I found this :
|
| * Viewport MUST have a restriction on the XPath match to match only
| elements, PI and comments (no attribute, no namespace) ; The same is
| true for p:for-each

Actually, the practical restriction is that the pattern has to match
an element or the document on #current won't be WF XML and that's a
dynamic error.

| --> It will confirm a substle difference of p:delete on attributes and namespace
| * It is currently said in the spec that we need an output element, why
| ? Why cannot it be defaulted ?

On viewport, it technically could be. But it couldn't be on for-each
or any other compound step. I'd be reluctant to have a defaulted
output in this single case.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | If you are losing your leisure, look
http://nwalsh.com/            | out! You may be losing your
                              | soul.--Logan Pearsall Smith

Received on Tuesday, 1 May 2007 14:27:11 UTC