XML Schema
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 1
- Joined: Mon Aug 23, 2004 5:59 am
XML Schema
New to XML Schema. I am writing the entire schema with the prefix of xs: but when I tried to insert the following I rcvd an error saying it was not valid with the schema but then I change it to the prefix of xsd: the error went away but the rest of the schema still has the prefix of xs:
ANY IDEAS!!!!!!!!!!
<xs: simpleType>
<xs: enumeration value="small"/>
</xs:simpleType>
Thank You

ANY IDEAS!!!!!!!!!!
<xs: simpleType>
<xs: enumeration value="small"/>
</xs:simpleType>
Thank You


-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
Sure you should get errors with the following schema:
The simpleType element defines a global simple type. You need to specify a name for the global symple type as you can see in one of the errors you get:
E s4s-att-must-appear: Attribute 'name' must appear in element 'simpleType'. test.xsd file:/D:/test/test.xsd 3:18
Also you cannot place enumeration directly inside a simple type, you can restrict for instance the string type to contain only the "small" string as value, like below:
I'm not sure what happens when you use xsd as prefix, you should post a full sample so we can have a look. Anyway, I get for instance an error for:
F The prefix "xsd" for element "xsd:simpleType" is not bound. test.xsd file:/D:/test/test.xsd 3:31
Best Regards,
George
Sure you should get errors with the following schema:
Code: Select all
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType>
<xs:enumeration value="small"/>
</xs:simpleType>
</xs:schema>
E s4s-att-must-appear: Attribute 'name' must appear in element 'simpleType'. test.xsd file:/D:/test/test.xsd 3:18
Also you cannot place enumeration directly inside a simple type, you can restrict for instance the string type to contain only the "small" string as value, like below:
Code: Select all
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="test">
<xs:restriction base="xs:string">
<xs:enumeration value="small"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Code: Select all
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name="test">
<xsd:enumeration value="small"/>
</xsd:simpleType>
</xs:schema>
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service