Sunday, 25 October 2009

Hi all

Today I tried playing with the “Fixed” property that can be set on an element or an attribute in your schema. According to the documentation, this is then a value that MUST be present in the element.

image

So the mapper is actually quite down with this – you cannot map anything to the field that has a value in the “Fixed” property. And when expecting the XSLT that is generated by the mapper you will find, that the mapper simply inserts the correct and hard coded value into the field.

image

Great.

Now, I created some links in the map just to test it, and chose that the mapper should validate the input for my map, but not the output, since I hadn’t bothered dragging all the necessary links.

To my surprise I got this error:

   1:  Output validation error: The value of the 'MiddleNames' element does not equal its fixed value.

An error validating the output of the map… but this surely must be a mistake, because I turned validation of the output from the map off and besides; the value in “MiddleNames” cannot be wrong, because the mapper has put it there it self, taken from the schema. Very weird indeed.

Only after quite a search, did I discover that the error was in validation of the INPUT to the map and not the output. I had used the same schema as both input and output, and my input instance did not have the correct value since it was an old test instance.

But really… Microsoft… that error message could be better! :-)

Hope this helps someone.

--
eliasen

Sunday, 25 October 2009 21:33:15 (Romance Standard Time, UTC+01:00)  #    Comments [0]  | 
All comments require the approval of the site owner before being displayed.
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, sup, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview

Theme design by Jelle Druyts