Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Devaka Cooray
Tim Cooke
Sheriffs:
Rob Spoor
Liutauras Vilda
paul wheaton
Saloon Keepers:
Tim Holloway
Tim Moores
Mikalai Zaikin
Carey Brown
Piet Souris
Bartenders:
Stephan van Hulst
Forum:
XML and Related Technologies
<xsd:attribute> & <xsd:sequence> mutually exclusive???
Mimi Tam
Ranch Hand
Posts: 121
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can anyone tell me how to straighten this out, please?
<?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="message"> <xs:complexType> <xs:attribute name="id" type="xs:string" use="required"/> [color=red]<xs:sequence minOccurs="0" maxOccurs="unbounded">[/color] <xs:element name="message" type="xs:string"/> <xs:element name="name" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="consumer" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema
>
Error is on the <xs: sequence> line.
In my XML:
<!-- client to server (upload info) --> <message id='msg_id'> <name>POST</name> <type>UPDATE</type> <!-- Request to update customer --> <consumer id='113'> <!-- unique Id --> <Hours_used>23</Hours_used> </consumer>dd </message>
The error message:
"s4s-elt-invalid-content.1: The content of '@AnonType_message' is invalid. Element 'sequence' is invalid, misplaced, or occurs too often"
Thanks very much in advance.
xmlerror.png
Paul Clapham
Marshal
Posts: 28304
95
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
There's a forum for XML. And the question has nothing to do with
JDBC
. Moving...
Benjamin Hiner
Greenhorn
Posts: 12
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I don't have the reference on me but sequences come before attributes.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="message"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="message" type="xs:string"/> <xs:element name="name" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="consumer" type="xs:string"/> </xs:sequence> <xs:attribute name="id" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:schema>
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
How to convert from sql to xml
Validating a SOAP document using XSD
problem with schemas
[schema] Allow an element to have any content
Schema Confusion?
More...