You are not logged in.

  • Login

Dear visitor, welcome to Coder Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Jon

Unregistered

1

Monday, May 16th 2011, 3:45pm

Attribute 'use' cannot not appear in element 'attribute'

Hello,

I am fighting with my first Schema! I want to check that a value is supplied for an element.

Tried this: "<xs:attribute name="reqString" type="xs:string" use="required"/>

Result: "s4s-att-not-allowed: Attribute 'use' cannot not appear in element 'attribute'.

According to http://www.w3schools.com/schema/schema_simple_attributes.asp it should work.

What am I missing??

TIA

Jon

2

Tuesday, May 17th 2011, 9:35pm

Yes, it should work.
Which xml parser are you using? Maybe you are missing the Namespace?

XML Code

1
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

Similar threads

Social bookmarks