Walbury’s Blog

How to crash out Xml Spy in less than 1 second…

Yep, another obscure bug for those coding in xml land. Ok so it’s not a valid schema BUT one has to admit VS20xx’s behaviour is substantially more graceful than XmlSpy’s!!
To crash out XmlSpy save below locally, and then drag it onto Xml Spy to open.
XmlSpy vanishes… (and we’re talking instantly!!!)

<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<xsd:element name="root">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element name="someElem" type="xsd:string"/>
				<xsd:group ref="grpOne"/>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
	<xsd:group name="grpOne">
		<xsd:sequence>
			<xsd:element name="someOtherElem" type="xsd:string"/>
			<xsd:group ref="grpOne"/>
		</xsd:sequence>
	</xsd:group>
</xsd:schema>

Ok, so what’s going on? A circular group refrence is all. XmlSpy can handle complexType circular references but not group it seems (by complexType I mean the scenario where when selecting create instance you get a nested <someElemName> 64 – ok I didn’t count… – deep)
Is it an error? Not really as the schema is stuffed. Still, the lack of feedback is less than optimal!

I just tried this at work on a newer version – it looks like this no longer happens in XmlSpy 2011!!

Advertisement

1 Comment »

  1. I’ve just found your post while evaluating newly released XmlSpy 2013. I tried your schema, and XmlSpy crashed instantly… I guess after all those years they still didn’t fix it….

    Comment by Chris B. — September 24, 2012 @ 12:36 am


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: