473,720 Members | 2,871 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.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 1673
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:strin g">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleConten t>
<extension base="csta:Buil ding">
<attribute name="swimingPo ol" type="csta:Pool " use="optional"/>
<attribute name="firePlace " type="csta:Fire Place" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property" >
<sequence>
<element name="myHouse" type="csta:Hous e" 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****@microso ft.com> wrote in message
news:uL******** ******@tk2msftn gp13.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:strin g">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleConten t>
<extension base="csta:Buil ding">
<attribute name="swimingPo ol" type="csta:Pool " use="optional"/>
<attribute name="firePlace " type="csta:Fire Place" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property" >
<sequence>
<element name="myHouse" type="csta:Hous e" 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****@microso ft.com> wrote in message
news:uL******** ******@tk2msftn gp13.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:strin g">
<enumeration value="undergro und"/>
<enumeration value="abovegro und"/>
</restriction>
</simpleType>

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

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

<complexType name="House" mixed="true">
<simpleConten t>
<extension base="yourTarge tName:Building" >
<attribute name="swimingPo ol" type="yourTarge tName:Pool"
use="optional"/>
<attribute name="firePlace " type="yourTarge tName:FirePlace "
use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property" >
<sequence>
<element name="myHouse" type="csta:Hous e" 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****@microso ft.com> wrote in message
news:uN******** ******@tk2msftn gp13.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:strin g">
</restriction>
</simpleType>

<complexType name="House" mixed="true">
<simpleConten t>
<extension base="csta:Buil ding">
<attribute name="swimingPo ol" type="csta:Pool " use="optional"/>
<attribute name="firePlace " type="csta:Fire Place" use="optional"/>
</extension>
</simpleContent>
</complexType>

<complexType name="Property" >
<sequence>
<element name="myHouse" type="csta:Hous e" 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****@microso ft.com> wrote in message
news:uL******** ******@tk2msftn gp13.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
3759
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 for that ? I am grateful for your help. Regards, Edouard
2
3593
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"> <xsd:attribute name="myAttr" type="myAttrType"
2
3097
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... This is the content of my XML Schema (minus the schema tag): <xsd:complexType name="AType"> <xsd:attribute name="attr1" type="xsd:string" />
1
2112
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 name="firstname" type="xsd:string"/> <xsd:element name="surname" type="xsd:string"/> </xsd:sequence> </xsd:complexType>
3
2059
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 (C#) program to validate the xml file against the xsd file without any error. The problem is that when I validate the same xml file within VisualStudio 2003, I got five errors, which are all related to xsd:extension. It seems that those "problem"...
2
1812
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" type="xsd:string" use="optional"/> </xsd:extension> </xsd:complexContent>
1
1859
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 optional. My type is defined as such <xsd:complexType name="DistanceStructure"> <xsd:sequence> <xsd:element name="Value"> <xsd:complexType> <xsd:simpleContent>
3
1751
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 name="4" /> </MethodSet>
5
12511
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 <restriction>-<enumerationto set all <th>'s text values, but also <extensionto add 1 attribute How to do it simultanously inside og 1 element? Here is simple code in XSD: <xsd:element name="TH" > <xsd:complexType>
0
9365
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9210
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9126
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9055
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7998
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6661
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4482
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2125
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.