Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: First pass at using a schema >Thread Next - Re: First pass at using a schema Re: First pass at using a schemaTo: NULL Date: 1/4/2007 11:01:00 AM "Martin Honnen" <mahotrash@y...> wrote in message news:459cfbbd$0$5711$9b4e6d93@n...... > C.W.Holeman II wrote: > >> <emle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="noNamespaceSchemaLocation >> http://emle.sourceforge.net/emle020000/emle.xsd"> > > This either needs to be > xsi:schemaLocation="http://emle.sourceforge.net > http://emle.sourceforge.net/emle020000/emle.xsd" > or > > xsi:noNamespaceSchemaLocation="http://emle.sourceforge.net/emle020000/emle.xsd" > > In your schema you need to decide what you want to do, > if you want to define elements in the namespace > http://emle.sourceforge.net/emle020000/emle.xsd, then you need to add > elementFormDefault="qualified" > as an attribute on xsd:schema. > If you want to define elements in no namespace then remove the > targetNamespace attribute. I want to specify what elements are allowed and to constrain them as defined in .xsd file. Also, I want to not use namespace prefixes at this time. So, this is waht I am trying: In http://emle.sourceforge.net/emle020000/emle_lab_003_testb.xml:xsi:noNamespaceSchemaLocation="http://emle.sourceforge.net/emle020000/emle_testb.xsd">In http://emle.sourceforge.net/emle020000/emle_testb.xsd:<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://emle.sourceforge.net">I get the same clean results as before. Then I again change the main element name from "emle" to "emelxxx" in the .xsd fileto force whatever kind of error will happen when the elements in my .xml do notmatch the ones defined in the .xsd file. I expect there to be some difference but see nochange in behavior. http://emle.sourceforge.net/emle020000/emle_lab_003_testxxx.xmlhttp://emle.sourceforge.net/emle020000/emle_testxxx.xsd | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
