[jsdl-wg] Parameter Sweep new artefact

Michel Drescher Michel.Drescher at uk.fujitsu.com
Thu Aug 21 06:52:12 CDT 2008


Folks,

while reading the ParameterSweep spec draft 13, I came again to the  
definition of the sweep:DocumentNode definition.

The DocumentNode is defined as of type xs:string containing a XPath  
2.0 expression.

This is the issue that I had numerous discussions with various people  
about. Despite having different reasons for why changing this, I agree  
with all of those people that it would be not wise to leave the  
definition of DocumentNode as it is without amending it.

In short, XML tooling does not universally provide namespace bindings  
declared in the containing XML document ([XML Namespace] spec is in  
complete silence whether namespace bindings are in scope for XML  
*content*), or do not guarantee that namespace bindings are up to date  
to match the prefixes used in the XPath expression. That means that  
the XPath processor has no guarantee that it can resolve all prefixes  
used in the XPath expression can be resolved to the correct  
namespaces, or even to any namespace at all.

The solution is to make the namespace bindings explicit that have been  
used to construct the XPath expression. That way, the ParameterSweep  
specification is independent of the tooling used by any implementer  
(which is a good thing :-).

I therefore propose to amend the DocumentNode element with an  
attribute that makes the bindings explicit as follows:

The attribute shall be named "mapping", and shall be defined as a  
mandatory anonymous XML attribute on the DocumentNode element.

The attribute shall be of type "list of Strings" further constrained  
as follows:
- It MUST have an even number of string parts.
- The list MUST be formed as follows:
   Part 0: Namespace URI
   Part 1: Prefix for part 0
   Part n+2: Namespace URI
   Part n+3: Prefix for Part n+2

The following is a brief example how the DocumentNode element would be  
used in a Sweep:

<sweep:DocumentNode
         mapping="http://schemas.ggf.org/jsdl/2005/11/jsdl-posix foo http://schemas.ggf.org/jsdl/2005/11/jsdl-posix 
  bar">
     //foo:POSIXApplication/bar:Argument[4]
<sweep:DocumentNode>

Note that the example is quite artificial as it binds the same  
namespace to two different prefixes. Nonetheless, it is a valid example.

I will also add a tracker issue for this.

Comments please?

Cheers,
Michel

--
Michel Drescher
Fujitsu Laboratories of Europe, Ltd.
Hayes Park Central
Hayes End Road
Hayes, Middlesex UB4 8FE
Reg. No. 4153469

+44 20 8606 4834
Michel.Drescher at uk.fujitsu.com






More information about the jsdl-wg mailing list