diff --git a/src/xproc/publish.xpl b/src/xproc/publish.xpl index c2501b3b9dd8417af11e78ce4401aa9bae4a1d5f..f4f27f8171d2f9b86999f2338307b3a0043e5120 100644 --- a/src/xproc/publish.xpl +++ b/src/xproc/publish.xpl @@ -7,18 +7,7 @@ <p:option name="objectId" required="true"/> <p:option name="targetUri" required="true"/> - <p:declare-step type="d:uuid-event"> - <p:input port="source"/> - <p:output port="result"/> - <p:option name="event" required="true"/> - - <p:add-attribute attribute-value="" match="uuid"> - <p:with-option name="attribute-name" select="$event"/> - </p:add-attribute> - <p:uuid version="4"> - <p:with-option name="match" select="concat('@', $event)"/> - </p:uuid> - </p:declare-step> + <p:import href="uuid.xpl"/> <p:declare-step type="d:uuid-source"> <p:output port="result"/> diff --git a/src/xproc/uuid.xpl b/src/xproc/uuid.xpl new file mode 100644 index 0000000000000000000000000000000000000000..eea2293ecc1502aecd95b692ea2c5ff51442dba1 --- /dev/null +++ b/src/xproc/uuid.xpl @@ -0,0 +1,18 @@ +<p:library version="1.0" + xmlns:p="http://www.w3.org/ns/xproc" + xmlns:d="http://dmaus.name/ns/xproc"> + + <p:declare-step type="d:uuid-event"> + <p:input port="source"/> + <p:output port="result"/> + <p:option name="event" required="true"/> + + <p:add-attribute attribute-value="" match="uuid"> + <p:with-option name="attribute-name" select="$event"/> + </p:add-attribute> + <p:uuid version="4"> + <p:with-option name="match" select="concat('@', $event)"/> + </p:uuid> + </p:declare-step> + +</p:library>