Chameleon schemas (Schemas without a target namespace)

Support FAQ > Liquid XML Studio

Summary

Note: This issue was resolved in Liquid XML Studio 2010 (v8).

Chameleon schemas may produce spurious errors and links may not be navigable on the diagram (appearing in red).

Introduction

Schemas without a target namespace are often referred to as chameleon schemas. Chameleon schemas can be included by any schema regardless of its target namespace, which then makes the type definitions and declarations in the chameleon schema acquire the target namespace of the enclosing schema.

This approach to designing schemas is often considered dangerous see Kohsuke KAWAGUCHI's article W3C XML Schema: DOs and DON'Ts

Steps to reproduce

The first time a schema with no namespace (NoNS.xsd) is included it takes on the namespace of the including schema (SchemaA.xsd), which is correct.

The problem arises if the schema with no namespace (NoNS.xsd) is then included from a schema with a different namespace (SchemaB.xsd), the namespace applied to NoNS.xsd sticks with the one it acquired from SchemaA.xsd.

A further problem exists, in that Chameleon schemas do not have to be valid in there own right, and can take components from the including schema. This behaviour also results in spurious errors.

Status

This issue was resolved in Liquid XML Studio 2010 (v8).

Applies To

Liquid XML Studio 2009 (v7) and lower.

Add Feedback