473,473 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XML Schema Quesions

I am defining an XSD file that will be used for a WSDL import. In my XSD I
am defining the objects and WS Operation messages. I have a few questions:

- For interoperability sake, how should objects be named, not including
messages? Should they be like this "appUser" or "appuser". Is there any
standards anywhere?

- Our database has the object defined with underscores and eveything is
uppercase, i.e. APP_USER. Should we define objects with an underscore?

- Built-In Types versus SimpleTypes. Let's say I have an object that
represent a table/object. That field has APP_USER_DESC, that is 50
characters long. If the type is represented in the XSD like this.

<xs:complexType name="app_user">
<xs:sequence>
<xs:element name="app_user_id" type="xs:int" />
<xs:element name="app_user_desc" type="xs:string" />
</xs:sequence>
</xs:complexType>

I cannot set the length of the string like this:

<xs:simpleType name="maxlength50">
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="app_user">
<xs:sequence>
<xs:element name="app_user_id" type="xs:int" />
<xs:element name="app_user_desc" type="maxlength50" />
</xs:sequence>
</xs:complexType>

My question is this too limiting? I can't stick anything over 50 characters
in the database but thought I would ask?

Is there is a guide for this kind of XSD development?

Thanks,
--
Mike Logan
Nov 12 '05 #1
1 1018
- Naming of elements and types is something that is domain and application
specific. You will not be able to find a XSD schema guide for that. Just go
with the convension your database or applications follow, or whatever is
easier to understand.

-Your usage of maxLength is correct.

Zafar

"Mike Logan" <Mi*******@community.nospam> wrote in message
news:99**********************************@microsof t.com...
I am defining an XSD file that will be used for a WSDL import. In my XSD I am defining the objects and WS Operation messages. I have a few questions:
- For interoperability sake, how should objects be named, not including
messages? Should they be like this "appUser" or "appuser". Is there any
standards anywhere?

- Our database has the object defined with underscores and eveything is
uppercase, i.e. APP_USER. Should we define objects with an underscore?

- Built-In Types versus SimpleTypes. Let's say I have an object that
represent a table/object. That field has APP_USER_DESC, that is 50
characters long. If the type is represented in the XSD like this.

<xs:complexType name="app_user">
<xs:sequence>
<xs:element name="app_user_id" type="xs:int" />
<xs:element name="app_user_desc" type="xs:string" />
</xs:sequence>
</xs:complexType>

I cannot set the length of the string like this:

<xs:simpleType name="maxlength50">
<xs:restriction base="xs:string">
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
<xs:complexType name="app_user">
<xs:sequence>
<xs:element name="app_user_id" type="xs:int" />
<xs:element name="app_user_desc" type="maxlength50" />
</xs:sequence>
</xs:complexType>

My question is this too limiting? I can't stick anything over 50 characters in the database but thought I would ask?

Is there is a guide for this kind of XSD development?

Thanks,
--
Mike Logan

Nov 12 '05 #2

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

Similar topics

2
by: wooks | last post by:
<?xml version='1.0'?> <userlogin xmlns="urn:faster:userlogin" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <login>mick</login> <password>brown</password> </userlogin> Above is my...
0
by: C. M. Sperberg-McQueen | last post by:
wooks (wookiz@hotmail.com) wrote: > <?xml version='1.0'?> > <userlogin xmlns="urn:faster:userlogin" > xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> > <login>mick</login> > ...
6
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. ...
1
by: Hari Om | last post by:
Subject: XML Schema to XML Schema Conversion I have an XML Schema A which needs to mapped to another XML Schema B. Is there any handy tool which I could use to convert from Schema A to Schema B?...
4
by: Gordon Dickens | last post by:
I have target xml to generate from schema. All of the XML instances have the same global element i.e. <base>. I would like to combine all of the schemas into a single schema where I could...
2
by: Stanimir Stamenkov | last post by:
I'm trying to find out if it is permissible to include a schema document with absent target namespace to a schema with specified target namespace, and if it is, what are the rules to resolve the...
0
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema"...
4
by: Iain A. Mcleod | last post by:
Hi I'm stuck with the following schema validation problem in VS.NET 2003: I have two types of xml document and related schema: project and projectCollection. A projectcollection is just a set...
0
by: Derek | last post by:
I am creating an intranet using Visual Web Developer Express Edition. Everything has been working OK until yesterday when I started getting 62 messages all beginning "Could not find schema...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.