A quick query about the 'value' of a p:with-option's select expression.

Where I invoke an XProc step thus (passing a sequence in the
'collection' option):


<ato:retrieveEntry env="int">
  <p:with-option name="collection" select="('foo', 'bar')"/>
</ato:retrieveEntry>


and within the step declaration I attempt to process the 'collection'
option thus:


<p:add-attribute match="/c:request" attribute-name="href">
  <p:with-option name="attribute-value"
      select="concat('http://api.', 
                       $env,
                       '.somewhere.co.uk/atomstore/',
                       string-join(($collection), '/')
                     )"/>
</p:add-attribute>


I notice that the string-join on the sequence ('foo', 'bar') returns
'foobar' instead of 'foo/bar' which is what I'd have expected.

Given that I have set xpath-version="2.0", am I right in assuming that a
sequence returned by an XPath expression, in this context, is
automatically concatenated to a single xs:untypedAtomic value rather
than honouring the sequence as it is declared?

Is there an explanation for this behaviour?


I'm using Calabash 0.9.10.




Regards

Philip Fennell

>XML Developer (The Forge)
>
>BBC Future Media & Technology
>Media Village, 201 Wood Lane London W12 7TP
>BC4 C4, Broadcast Centre
>
>T:	0208 0085318

http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

Received on Monday, 22 June 2009 14:56:12 UTC