on 07-07-2010 10:11 AM
Hello
Is there a problem with preserving white space when using a XSL mapping? My schema has the following included:
<xs:element name="FileVersion" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="5"/>
<xs:whiteSpace value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
The whiteSpace attribute alone didn't do it, so I've added length as well which didn't help either.
My imported XSL mapping writes a fix value of " 6.00" (having a leading space) into the field:
<FileVersion>
<xsl:value-of select="' 6.00'"/>
</FileVersion>
Processing the mapping with an external tool provides the correct output with a leading space.
The leading space is missing in the output file or when I do testing in the integration builder. Looking at the target payload in sxmb_moni also shows me the value without leading space:
<FileVersion>6.00</FileVersion>
What do I miss? I haven't really found a posting regarding the issue, hence I assume it isn't really one!? Any feedback is appreciated.
Thanks,
Daniel
Is your XSLT mapping using xsl:preserve-space declaration: http://www.w3schools.com/xsl/el_preserve-space.asp
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My XSLT mapping does not have a preserve-space declaration. I am using Altova MapForce, and apparently preserve-space is not a declaration that is supported by MapForce. I would need to manually add it to the mapping after generating it in the tool. Nevertheless, isn't preserve-space the default anyway if nothing is declared, and therefore not necessary?.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.