Editions on p:make-absolute-uris

Hello.

 

I noticed some unnecessary restrictions to p:make-absolute-uris that I
thought I share and suggest possible solutions. On that step (A.2.14) it
says:

 

"

The match contains a match pattern that identifies the element or attribute
whose text value is to be changed. It is a dynamic
<http://www.w3.org/XML/XProc/docs/langspec.html#dt-dynamic-error>  error (
<http://www.w3.org/XML/XProc/docs/langspec.html#err.C0008> err:XC0008) if
the pattern does not match an element or attribute.

"

 

What does "pattern" mean here? XPath 1.0 expression? Seems so to me. If so,
why not make it:

 

"

The match contains a XPath 1.0 expression that identifies the node(s) whose
text value is to be changed.

 

.

The XPath
<http://www.w3.org/XML/XProc/docs/langspec.html#step-xpath-context>  context
for the match option is: the context document is the document that appears
on the source port and the context position and context size are both "1".

"

There's no need for a dynamic error here. Just let the output document
appear as it was (no match, no changes). And if this is an XPath 1.0
expression, why now also allow matching of text nodes, PI nodes and comment
nodes? In all cases, the text value is used. And the previous paragraph
already says

 

"

In the case of elements, this replaces all the element's children with a
single sequence of characters that contain the absolute URI.

"

 

Which is otherwise the only "edge case".

 

BTW, there are also other places in the spec where "pattern" is used without
any explanation to the model the pattern actually follows and it's only the
name of the attribute - match, that suggest (but doesn't really mean) that
we're talking about XPath 1.0 expressions. Such places include:

p:add-attribute
<http://www.w3.org/XML/XProc/docs/langspec.html#c.add-attribute>  (there's
not even XPath context here to further suggest XPath expression)

p:delete <http://www.w3.org/XML/XProc/docs/langspec.html#c.delete> 

p:insert <http://www.w3.org/XML/XProc/docs/langspec.html#c.insert> 

 

Regards,

Vasil Rangelov

 

Received on Friday, 10 August 2007 14:20:27 UTC