- From: Georges Schmitz <georges.schmitz@arcor.de>
- Date: Tue, 26 Jun 2012 18:31:21 +0200
- To: XProc Dev <xproc-dev@w3.org>
Received on Tuesday, 26 June 2012 16:32:02 UTC
Hi,
I wonder if there is an elegant way to get this working on "empty text
nodes".
I have to achieve a transfer of attribute data into a text node :
<status value="active"/> => <status>active</status>
So my approach was to first create the text node and in a second step
drop the "value" attribute. But the creation of text nodes already fails
with:
<p:string-replace match="*[@value]/node()"
replace="parent::*/@value" name="value-attr2textnode"/>
For
<status value="active"/>
<p:string-replace> doesn't produce anything, you need at least
whitepsace in between.
<status value="active"> </status>
It seems that "string-replace" is interpreted pretty literally; if there
is no text node, nothing to replace and it won't be created.
Should I solve this with a little inline XSLT (which is easy), or can
this be done with lean XProc "on-board equipment"?
Thanks for any response,
Georges
Received on Tuesday, 26 June 2012 16:32:02 UTC