Hi,
I'm new to gml so probably this is simple question.
If I'm writing to gml and all features have <missing> (or null or empty) attribute called "my_attribute" then "something" wont be written to output GML. How to write it regardles?
Hi,
I'm new to gml so probably this is simple question.
If I'm writing to gml and all features have <missing> (or null or empty) attribute called "my_attribute" then "something" wont be written to output GML. How to write it regardles?
You will need to give the attribute a value using the NullAttributeMapper.
I would for example add a space to all null attributes to force them to the output.
You will need to give the attribute a value using the NullAttributeMapper.
I would for example add a space to all null attributes to force them to the output.
No, I don't want space sign, zero sign, empty quotation marks... I'd like to have null value in according attribute in gml.
Thank you for your reply
No, I don't want space sign, zero sign, empty quotation marks... I'd like to have null value in according attribute in gml.
Thank you for your reply
Hi @zzupljanin, if you mean that "null value" for the destination GML is an empty XML element like <my_attribute />, I think you can still use the NullAttributeValueMapper to assign Empty String to the <missing> attribute, so that an empty XML element will be written.
Hi @zzupljanin, if you mean that "null value" for the destination GML is an empty XML element like <my_attribute />, I think you can still use the NullAttributeValueMapper to assign Empty String to the <missing> attribute, so that an empty XML element will be written.
I'm guessing you want something like <item xsi:nil="true"/> or <item xsi:nil="true"></item>
FME should do that if:
I'll freely admit I don't really know what minOccurs is supposed to represent, but I do know this won't work if it is set to 0 (zero).
I hope this helps. Let me know if not and I can ask one of our XML experts to give their opinion.
I'm guessing you want something like <item xsi:nil="true"/> or <item xsi:nil="true"></item>
FME should do that if:
I'll freely admit I don't really know what minOccurs is supposed to represent, but I do know this won't work if it is set to 0 (zero).
I hope this helps. Let me know if not and I can ask one of our XML experts to give their opinion.
I'm guessing you want something like <item xsi:nil="true"/> or <item xsi:nil="true"></item>
FME should do that if:
I'll freely admit I don't really know what minOccurs is supposed to represent, but I do know this won't work if it is set to 0 (zero).
I hope this helps. Let me know if not and I can ask one of our XML experts to give their opinion.
minOccurs is a bit of a red herring. It seems to be a flag for optional. 1 or more means that the element has to appear. FME generated schemas are always zero meaning optional (nill isn't disallowed, but it isn't defined either).
If using an existing schema, and the schema says that the element is both required (minOccurs="1") and nillable, then the GML writer will generate the element with the xsi:nil="true", because it the schema says it must be present in the output.