Schema: xs vs xsd

Having trouble installing Oxygen? Got a bug to report? Post it all here.
Steve Wilkison
Posts: 6
Joined: Wed May 19, 2004 6:29 pm

Schema: xs vs xsd

Post by Steve Wilkison »

Basic question: I have two books on XML, both say that a schema should begin with <xsd: schema xmlns:xsd....etc.>

But when I create a new schema in Oxygen it starts with just <xs: schema xmlns:xsd....etc.>

Why is this? Should I manually add the missing "d" each time I create a new schema? Thanks for any insight.

Steve
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Steve,

The important part is the namespace, http://www.w3.org/2001/XMLSchema, one can bind any prefix to that, for instance the following document is also a valid XML schema:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<schema:schema xmlns:schema='http://www.w3.org/2001/XMLSchema'>

</schema:schema>
If you prefer to have your schemas with xsd as prefix just create a document template by entering the following code in the schema editor and choose "Add to templates" action then use "New from templates" action / "User defined" / your template name - to create new schemas.

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'>

</xsd:schema>
Best Regards,
George
Steve Wilkison
Posts: 6
Joined: Wed May 19, 2004 6:29 pm

Post by Steve Wilkison »

Thanks!
Post Reply