"Dave Brosius" <[EMAIL PROTECTED]> wrote on 08/01/2005 10:48:25 AM:
> > xsd can't be in the xml document in general, unless you write some code to > create two input streams based on the same file > and position them in the two correct places. The schema spec allows for inlining of schema documents [1]. Here's an example [2] of an inline schema (actually two in one document) in WSDL. The <schema> element doesn't need to be at the root of the document. API support was probably a problem in the past, but that isn't the case anymore with JAXP 1.3. Have a look at the jaxp.InlineSchemaValidator [3] sample which comes with Xerces 2.7.x. > schema location can be absolute or relative > > ----- Original Message ----- > From: [EMAIL PROTECTED] > To: [email protected] ; [email protected] ; > [email protected] > Sent: Monday, August 01, 2005 8:19 AM > Subject: xsd file in the xml instance file > > > > Hi Everyone, > > Sorry if my questions are on the wrong mailing-list(s) but in case you can > answer these: > > - can an XML instance document contain the validation xsd file in itself > and not just an xsi:schemaLocation reference? > - can the schemaLocation property be any path (absolute and relative), too? > > The problem is that there is an xml file which is being modified and saved > again and again, and sometimes it is saved into another directory and this > time the relative schemaLocation reference becomes unavailable...(I mean the > xsd file gets unavailable from the referencing instance document...) > > > Many thanks to You in advance, > > Kind regards, > > Csaba Szucs > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > [1] http://www.w3.org/TR/xmlschema-1/#key-schemaDoc [2] http://www.w3.org/TR/2005/WD-wsdl20-primer-20050510/#schemaIds.wsdl [3] http://xml.apache.org/xerces2-j/samples-jaxp.html#InlineSchemaValidator Michael Glavassevich XML Parser Development IBM Toronto Lab E-mail: [EMAIL PROTECTED] E-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
