Hi =?Utf-8?B?V29yZCBEb2N1bWVudCBhbmQgWE1MIHNjaGVtYQ==?=,
[Quoted Text] > 1. Map valid XML schema(XSD) containg nodes of Data type "Integer". > 2. Load it into Word and place it on document > 3. It will not validate the schme as it contain nodes having data type > "Integer" > but if u change the data type to "String". It validate the schema > successfullly > > 1. Map valid XML schema(XSD) containg nodes of Data type "Integer". > 2. Load it into Word and place it on document > 3. It will not validate the schme as it contain nodes having data type > "Integer" > but if u change the data type to "String". It validate the schema > successfullly >
I want to double-check that I'm following your scenario correctly: You have a schema, you attach it to a document (Tools/Templates and Add-ins/XML Schema), then you add the nodes to the document using the XML Structure task pane. Is my understanding up to this point correct?
At this point, yes, you're certainly getting a validation error.
Now, if you type an integer into a node of this type, does the validation error go away?
This is "by design", as far as Word + schemas go. If there's nothing in an element, Word interprets this as a zero-length string. So you won't get a validation error with a string type. For any other data type, you have to actually type something into the element so that it can be converted (by Word - since as far as Word is concerned EVERYTHING is a string) and validated.
Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
|