473,406 Members | 2,208 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,406 software developers and data experts.

.NET doesn't support xsd:extension and xsd:attribute??

It seems that .NET does not support xsd:extension and xsd:attribute. What is
the alternative?

Thanks,
Nov 12 '05 #1
4 1655
It does support the following. Please give your use case.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
It seems that .NET does not support xsd:extension and xsd:attribute. What is the alternative?

Thanks,

Nov 12 '05 #2
Hi,

Thank you for the reply.

This is the schema I just tested:

<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleContent>
<extension base="csta:Building">
<attribute name="swimingPool" type="csta:Pool" use="optional"/>
<attribute name="firePlace" type="csta:FirePlace" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>

When I load this into a .NET project, House is serialized as a System.Object
If I try to use it:
Dim myHouse As Testing.House

The only function that can be invoked is: myHouse.GetType()

Did I do something incorrect?

Thanks,

"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
It does support the following. Please give your use case.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
It seems that .NET does not support xsd:extension and xsd:attribute.
What is
the alternative?

Thanks,


Nov 12 '05 #3
Is the schema you posted the complete schema? If it is then it is not valid.
You dont have typed defined for Pool and Fireplace which would lead to
failure to compile the schema. If you have the complete schema, please give
its contents.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
Hi,

Thank you for the reply.

This is the schema I just tested:

<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleContent>
<extension base="csta:Building">
<attribute name="swimingPool" type="csta:Pool" use="optional"/>
<attribute name="firePlace" type="csta:FirePlace" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1" maxOccurs="1"/> </sequence>
</complexType>

When I load this into a .NET project, House is serialized as a System.Object If I try to use it:
Dim myHouse As Testing.House

The only function that can be invoked is: myHouse.GetType()

Did I do something incorrect?

Thanks,

"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
It does support the following. Please give your use case.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
It seems that .NET does not support xsd:extension and xsd:attribute.

What
is
the alternative?

Thanks,



Nov 12 '05 #4
Opps, forgot about the two types:

<simpleType name="Pool">
<restriction base="xsd:string">
<enumeration value="underground"/>
<enumeration value="aboveground"/>
</restriction>
</simpleType>

<simpleType name="FirePlace">
<restriction base="xsd:string">
<enumeration value="gas"/>
<enumeration value="wood"/>
</restriction>

</simpleType>
<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleContent>
<extension base="yourTargetName:Building">
<attribute name="swimingPool" type="yourTargetName:Pool"
use="optional"/>
<attribute name="firePlace" type="yourTargetName:FirePlace"
use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>
Just simply copy and paste the above XML into any working (.NET importable)
wsdl file and replace "yourTargetName" with your target name.

Thanks,
"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uN**************@tk2msftngp13.phx.gbl...
Is the schema you posted the complete schema? If it is then it is not valid. You dont have typed defined for Pool and Fireplace which would lead to
failure to compile the schema. If you have the complete schema, please give its contents.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
Hi,

Thank you for the reply.

This is the schema I just tested:

<simpleType name="Building">
<restriction base="xsd:string">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleContent>
<extension base="csta:Building">
<attribute name="swimingPool" type="csta:Pool" use="optional"/>
<attribute name="firePlace" type="csta:FirePlace" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property">
<sequence>
<element name="myHouse" type="csta:House" minOccurs="1"

maxOccurs="1"/>
</sequence>
</complexType>

When I load this into a .NET project, House is serialized as a

System.Object
If I try to use it:
Dim myHouse As Testing.House

The only function that can be invoked is: myHouse.GetType()

Did I do something incorrect?

Thanks,

"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uL**************@tk2msftngp13.phx.gbl...
It does support the following. Please give your use case.

"trexim" <tr****@hotmail.com> wrote in message
news:2s*************@uni-berlin.de...
> It seems that .NET does not support xsd:extension and xsd:attribute.

What
is
> the alternative?
>
> Thanks,
>
>



Nov 12 '05 #5

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

Similar topics

4
by: Edouard Mercier | last post by:
Hi to all; I have a very basic question: is is possible in XML Schema to express that two attributes on an XML element are exclusive, and if yes, what is the most appropriate idiomatic syntax...
2
by: Matthet | last post by:
Hi, I'm defining an element that is based on simpleType named "myPatternType" <xsd:element name="MyElement"> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="myPatternType">...
2
by: Sean Bright | last post by:
Hi there. I'm having a problem which I hope is a simple one... Any help would be appreciated. I think it has something to do with the way attributes are (or are not) inherited in schemas... ...
1
by: mre | last post by:
Is there a program that will flatten an XSD, that is, will transform... <xsd:element name="name" type="nameType"/> <xsd:complexType name="nameType"> <xsd:sequence> <xsd:element...
3
by: man-in-nature | last post by:
Hello, I have already read several existing posts about xsd:extension, but do not find something useful to my test case. I have one xml file and one xsd file. I can use a simple command line...
2
by: Kent Boogaart | last post by:
Hello, I have a complex type defined in its own schema as follows: <xsd:complexType name="myType"> <xsd:complexContent> <xsd:extension base="myBaseType"> <xsd:attribute name="parentId"...
1
by: Gazza | last post by:
I want to define an element type which has child elements which will have an attribute, but I want the presence of content for these child elements (which will be simple when present) to be...
3
by: Amol | last post by:
Hi all, I have a case where I have a element that can appear under multiple elements e.g. <AppFunctions> <UseTemplate name="1"/> <MethodSet name="2"> <UseTemplate name="3" /> <MethodCall...
5
by: Dmitry Kulinich | last post by:
Guys! I've got 1 more small problem with XSD. It simple and good, but sometimes disappointing. For example we have 3 <THtags - only text and 1 attribute. Then we need...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.