| Leo Gan 2005-12-23, 5:54 pm |
| http://geekswithblogs.net/leonidganeline/
When I create maps it is annoying to guess which values I'll get if I have
to mapping Empty or Missing attributes/elements. I've made an investigation
on the base of a Standard "XML Schema Part 0: Primer. W3C Recommendation, 2
May 2001".
http://www.w3.org/TR/2001/REC-xmlsc...enceConstraints
(below is this article).
I added the last column with my comments to the original table.
I used the BTS2004 Mapper and "Test Map" command. I've changed the
properties of attribute and element in a target schema.
I waited that the behaviour of mapping should be the same as in standard.
Results are different in several points:
1) "Fixed" and "Default" properties don't change mapping. They only change
validation and they have a different effect on validation.
2) "Required" property of attributes: If source attribute is missing the
mapping creates the attribute with Empty value.
3) Something strange with "min/maxOccures" properties of elements: If they
are (1,1), (-,1), (1,-), or (-,-) and source element is missing the mapping
creates an element with Empty value! Only these combinations generate an
element with Empty value, other combinations do not create an element.
--
Regards,
Leonid Ganeline,
BizTalk Developer, MCSD,
Vancouver,
http://geekswithblogs.net/leonidganeline/
|