Group:  General ยป microsoft.public.office.xml
Thread: Word 2003 : Unable to validate schema node having data type "Integ

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Word 2003 : Unable to validate schema node having data type "Integ
Word Document and XML schema 19.08.2006 21:04:25
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

Re: Word 2003 : Unable to validate schema node having data type "Integ
Cindy M. <C.Meister-C[ at ]hispeed.ch> 20.08.2006 08:56:14
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 :-)

Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net