Afternoon all. Been a while since I need to ask a dumb question but here I am again.

I'm trying to track down an odd behaviour of an XProc script when run within Oxygen. Specifically, I'm trying to output the input options because I may be configuring them wrongly in Oxygen. 
That's led to my using p:add-attribute to dump out an input in the result document. 
It's not working as I would expect. The relevant lines of the script are below:

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step"
    xmlns:cx="http://xmlcalabash.com/ns/extensions" name="docx2xml"
    xmlns:rels="http://schemas.openxmlformats.org/package/2006/relationships" version="1.0"
    xmlns:corbas="http://www.corbas.co.uk/ns/xproc" xmlns:temp="http://www.corbas.co.uk/ns/temp">

    <p:output port="result" primary="true">
        <p:pipe port="result" step="the-end"/>

    <p:option name="package-url" required="true"/>

    <p:import href="library-1.0.xpl"/>

	<!-- A large amount of code deleted here -->
    <p:identity name="create-sequence">
        <p:input port="source">
            <p:pipe port="result" step="get-doc"/>
            <p:pipe port="result" step="get-styles"/>
            <p:pipe port="result" step="get-numbering"/>
            <p:pipe port="result" step="get-footnotes"/>
            <p:pipe port="result" step="get-endnotes"/>
            <p:pipe port="result" step="get-app-properties"/>
            <p:pipe port="result" step="get-core-properties"/>

    <p:wrap-sequence name="wrap-up" wrapper="word-doc"

    <p:add-attribute name="insert-url" xmlns:temp="http://www.corbas.co.uk/ns/temp"
        <p:with-option name="attribute-value" select="$package-url"/>

The problem is the attribute value. It's empty. My result document now looks like:

<word-doc xmlns="http://www.corbas.co.uk/ns/temp" package-url="">
		<!-- several thousand lines of markup -->

What blindingly obvious thing am I doing wrong given that 'package-url' definitely has the right value at the start of this script (when run from the command line)?



Corbas Consulting / @CorbasLtd
Digital Publishing Consultancy and Training
http://www.corbas.co.uk, +44 (0)7718 906817/+44 (0)1273 930765	

Received on Thursday, 21 June 2012 16:51:15 UTC