- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 11 Sep 2001 08:47:18 +0100
- To: Paul Jakubik <pauljakubik@yahoo.com>
- Cc: xmlschema-dev@w3.org
Paul Jakubik <pauljakubik@yahoo.com> writes: > I am trying to add appinfo annotations to a schema. The > annotations themselves are xml. I want the schema to still be > able to be validated. > > The problem I have is that when I validate the schema the > parser complains that the XML in the annotation is not > declared. Three issues: 1) Relative URIs are deprecated as namespace names -- I suggest you change yours; 2) Many currently available XML Schema implementations don't give you any way of providing additional schema docs 'on the command line', as it were. Depending on which parser you're using, try adding xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation "[corrected GUI nsname] GuiInfo.xsd" to your main schema. 3) Whatever parser you're using is not conformant, in that the content of xs:appinfo is supposed to be laxly validated, so the absence of declarations should not raise an error. > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE xs:schema PUBLIC > "-//W3C//DTD XMLSCHEMA 200102//EN" > "./XMLSchema.dtd"> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:gui="./GuiInfo.xsd" > elementFormDefault="qualified" > version="1.0.0"> > <xs:element name="Something"> > <xs:annotation> > <xs:appinfo> > <gui:displayName>Some Thing</gui:displayName> > <gui:helpText>The help text.</gui:helpText> > </xs:appinfo> > </xs:annotation> <snip/> > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:gui="./GuiInfo.xsd" > targetNamespace="./GuiInfo.xsd" > version="1.0.0"> > <xs:element name="displayName" type="xs:string"/> > <xs:element name="helpText" type="xs:string"/> > </xs:schema> ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/
Received on Tuesday, 11 September 2001 03:46:47 UTC