Hi!
I’m using XML_WRITER to create dynamic metadata from XML_XPATH_READER. The problem occurs when I want to write SPACE as fieldDelimiter; it loses it’s content during the data propagation.
XML_XPATH_READER
...
<!-- Record delimiter -->
<Context xpath="parameter[@name='Delimiter']" outPort="0">
<Mapping xpath="replace(text(),'SPACE', ' ')" cloverField="fieldDelimiter"/> <!-- the 'SPACE' value comes from external XML -->
</Context>
...
<Context xpath="parameter[@name='InputFields']/inputfield" outPort="1">
<Mapping xpath="@fieldname" cloverField="name"/>
</Context>
....
XML_WRITER:
<Mapping
inPort="0"
element="Record"
key="keyID"
fieldsAs="attributes"
fieldsIgnore="keyID">
<Mapping
inPort="1"
element="Field"
key="name"
keyToParent="keyID"
fieldsAs="attributes"
fieldsIgnore="keyID">
</Mapping>
</Mapping>
Result:
<?xml version="1.0" encoding="UTF-8"?>
<Record fieldDelimiter="" recordDelimiter="\n" name="L1_51_B1" type="delimited"> <!-- yeep, no space in fieldDelimiter :( -->
<Field name="Rows_ident" type="string"/>
<Field name="tToken_1" type="string"/>
<Field name="tToken_2" type="string"/>
<Field name="tToken_3" type="string"/>
<Field name="tToken_4" type="string"/>
<Field name="tToken_5" type="string"/>
<Field name="tToken_6" type="string"/>
</Record>