Graphical design component

r4 - 06 Jan 2005 - 16:42:44 - BobMorrisYou are here: TWiki >  SDD Web > NewlinesInSchemaLocationAttribute

NewlinesInSchemaLocationAttribute

You only care about this topic if you are using XSLT to transform instance documents for some reason, and if you want to use XML Spy to do so. One such case is a tool written by JacobAsiedu to help debug the key/keyref attributes in instance documents (see DebugRef). XML Spy's XSLT engine has a bug that sometimes causes inappropriate input to be put into an output document in the case where the input document's xsi:schemaLocation attribute has a newline separating the two required parts of the attribute value. This is not too fatal if you don't care about validating the output document, but sometimes you do. Thus, instead of

xsi:schemaLocation="http://www.tdwg.org/2003/SDD.09 
SDD.09.xsd"

you should have

xsi:schemaLocation="http://www.tdwg.org/2003/SDD.09 SDD.09.xsd"

Symptom: the constructed document will have the entity refrence 
 between the two parts of the xsi:schemaLocation attribute. This will cause validation to fail immediately (because Spy attempts to validate newly created documents if they have a schema named in them).

Cure: You must replace 
 with any whitespace, including a newline, unless you don't care about validation (which is often a dangerous position...)

Workaround: avoid newline inside the xsi:schemaLocation in your instance documents.

-- BobMorris - 26 Nov 2003

Edit | Attach | Printable | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Back to TDWG Homepage TDWG Wiki > SDD
This site is powered by the TWiki collaboration platform

Valid XHTML 1.0 Transitional
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback