Subject:Required attribute 'space' was not provided Author:Joyce Mallwitz Date:27 Jan 2006 02:48 PM
I have created a Word Document( XX.Doc ) and did a SaveAs XML File(XX.XML). I opened XX.XML document in Stylus and chose to Creat Schema from XML Format. A schema was created. When I did a validation on the XX.XML document with the newly created schema. I get the following error.
Required attribute 'space' was not provided
What do you suggest I do to get a clean validation.
Subject:Required attribute 'space' was not provided Author:Tony Lavinio Date:27 Jan 2006 03:06 PM
There could be any number of problems; to find them we'd need to see
the actual output from Word.
Each version of Word, and even depending on the patch level, will
produce different XML output.
And XML Schema generators can at best make a guess at the schema that
will match the XML document. It's quite possible to create XML documents
for which no XML schema can fully define, because the XML Schema language
does not provide support for all possible expressions of XML. So the
schema generators take a best 'guess' at matching.
Note also that since each different Word document uses a different
subset of the full product, such a schema may not work for all documents
created even with that version of Word.
Now, the newer versions do have an XML syntax for which Microsoft does
provide the schemas; those are available from Microsoft's web site.
If you want us to take a stab at it, please attach your XML document,
or email a copy to stylus-field-report (at) progress.com
Subject:Required attribute 'space' was not provided Author:Tony Lavinio Date:27 Jan 2006 05:06 PM
Sadly, you've found a bug.
To generate schemas, we use a 3rd-party component called Trang.
For some reason, it insists on creating schemas for the two reserved
namespace prefixes, xml: and xsi:.
A work-around is to remove the xml:space, and any xsi: elements,
make the schemas (which will add back the proper xsi: element), and
then just add back the xml:space as it was.