473,395 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Is this complexType declaration valid?

Dear All,

I have a question to ask about the validity of a complexType
declaration.

Lets say an element declaration inside a schema looks like this....

<element name="abc" type="abcType">

and type declaration looks like,

<complexType name="abcType">
<attribute name="abcAttr" type="string">
</complexType>

Is the above mentioned valid? The question really came up when I
was trying to figure out what would be content of the element
'abc' in the instance and how would I verify/validate it.

Thanks in Advance,
Mahesh Kanakaraj

Jul 10 '07 #1
1 1502
ma**************@gmail.com wrote:
Lets say an element declaration inside a schema looks like this....

<element name="abc" type="abcType">

and type declaration looks like,

<complexType name="abcType">
<attribute name="abcAttr" type="string">
</complexType>

Is the above mentioned valid? The question really came up when I
was trying to figure out what would be content of the element
'abc' in the instance and how would I verify/validate it.
With that definition the element needs to be empty. What you have
defined is a shortcut for
<xs:complexType>
<xs:complexContent>
<xs:restriction base="xs:anyType">
<xs:attribute name="abcAttr" type="xs:string"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
See <http://www.w3.org/TR/xmlschema-0/#emptyContentfor more explanation.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: D. Alvarado | last post by:
Hello, I am trying to validate my XML document against a schema using the Sun Multi-Schema XML Validator. Unfortunately, my schema fails to validate, and is failing because of this cryptic...
0
by: tsolbjor | last post by:
Hi, Im trying to make a Schema with a complexType that can include different elements. It is not a sequence, and when I use the "all" indicator I cant set the maxOccurs="unbounded". Heres...
4
by: Nicolas Mailhot | last post by:
Hi, I've been sent an xsd that uses the following construct : <xsi:element name="foo"> <xsi:complexType name="foo"> Is this something allowed ? I couldn't find anything that said it's...
0
by: Paul Smith | last post by:
Hi there I want to connect to a web service on-the-fly programmatically like so: WS.mssoapinit(http://paul/stddemo/ws/service.asmx?wsdl) which is successful. I can access the web service ...
1
by: Istvan | last post by:
Hi ! Can somebody tell me if it's possible to overwrite an element definition when I derive an complexType (with extension, or something like this ) ? The base complexType looks like: ...
0
by: dchappelle | last post by:
Hi, I used wsdl.exe to generate a C# client proxy - included is a piece of the wsdl file of interest... <complexType name="GetSubscriberListEntry"> <sequence> <element name="ServiceId"...
3
by: Gerry Vandermaesen | last post by:
Hi, I am currently having the exact same problem as described here: http://bugs.php.net/bug.php?id=36226 The webservice is configured to return 0-* objects of a complextype, but when only...
1
by: mahesh.kanakaraj | last post by:
Hi All, I have a confusion in finding the 'effective content' of a complex type definition in a XML Schema. I shall give you an example situation to clearly explain my problem. Let's have...
10
by: Raman | last post by:
Hi All, Is it valid: struct test{ }; I mean, Can we have a struct containing no members? Is this a an
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.