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

Attributes in XSD

markmcgookin
648 Expert 512MB
Hi Folks,

I am having a problem here, I use a piece of software to create xml based interfaces for an application, and I can bind these interfaces datasource to a dataset that I am currently creating using an xsd schema.

Not being an xml expert I can not for the life of me figure out a way to create an xsd schema file that has elements of a type (i.e. xs:string) but that also have attributes...

Ideally I want

Expand|Select|Wrap|Line Numbers
  1. <xs:element name="A1203513053788" type="xs:string">
  2.                     <xs:complexType>
  3.                         <xs:attribute name="Section" type="xs:string" />
  4.                         <xs:attribute name="Title" type="xs:string" />
  5.                         <xs:attribute name="IType" type="xs:string" />
  6.                         <xs:attribute name="Ident" type="xs:string" />
  7.                     </xs:complexType>
  8.                 </xs:element>
Type stuff.. however I know you can not have a type declaration where there is a child node complexType that will declare the type. How can I make this a String or an Int element, but also include attributes in it?

I can not create nodes using ref="myNodeType" stuff, as the software we are using can't seem to create this join and link up the datatables...

Any help would be brilliant here...

Cheers,

Mark (Moderator/Expert - Mobile Development Forum)
Mar 14 '08 #1
1 1393
markmcgookin
648 Expert 512MB
Hi Folks,

I am having a problem here, I use a piece of software to create xml based interfaces for an application, and I can bind these interfaces datasource to a dataset that I am currently creating using an xsd schema.

Not being an xml expert I can not for the life of me figure out a way to create an xsd schema file that has elements of a type (i.e. xs:string) but that also have attributes...

Ideally I want

Expand|Select|Wrap|Line Numbers
  1. <xs:element name="A1203513053788" type="xs:string">
  2.                     <xs:complexType>
  3.                         <xs:attribute name="Section" type="xs:string" />
  4.                         <xs:attribute name="Title" type="xs:string" />
  5.                         <xs:attribute name="IType" type="xs:string" />
  6.                         <xs:attribute name="Ident" type="xs:string" />
  7.                     </xs:complexType>
  8.                 </xs:element>
Type stuff.. however I know you can not have a type declaration where there is a child node complexType that will declare the type. How can I make this a String or an Int element, but also include attributes in it?

I can not create nodes using ref="myNodeType" stuff, as the software we are using can't seem to create this join and link up the datatables...

Any help would be brilliant here...

Cheers,

Mark (Moderator/Expert - Mobile Development Forum)
Also this:

Expand|Select|Wrap|Line Numbers
  1. <xs:attribute name="type" type="xs:string" fixed="xs:int" />
didnt work, I got an error binding an item on the interface to it.. I dont think it can see it's an int
Mar 14 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

50
by: Dan Perl | last post by:
There is something with initializing mutable class attributes that I am struggling with. I'll use an example to explain: class Father: attr1=None # this is OK attr2= # this is wrong...
1
by: John L. Clark | last post by:
I am curious as to the rationale, and effect, of having default namespaces not applying (directly) to attributes (see http://www.w3.org/TR/REC-xml-names/#defaulting). Given an attribute without a...
9
by: Soren Kuula | last post by:
Hi, I just can't find namespaces of attributes stated clearly enough in the XML namespace spec. But .. I hear rumors that attributes, unless qualified otherwise, default to the namespace of the...
7
by: Info 3000 | last post by:
Hello, I'm beginner in XML. I have just a little question : I understand that I can write : <Book> <Title> A nice day </Title> <Author> James Nicepen </Author> </Book>
7
by: John R. | last post by:
How do you set the following file attributes: Compressed Encrypted Normal ReparsePoint SparsePoint You CAN'T set these using FileInfo.Attributes or File.SetAttributes. It doesn't work for...
7
by: localhost | last post by:
What is the best and/or fastest way to enumerate attributes of an HTML control? In my page template, I have: <body id="myBody" bottomMargin="0" leftMargin="0" topMargin="0" rightMargin="0"...
3
by: Janaka | last post by:
I've seen and used some samples where you can set the onclick attrubute to a Button control to get it to do some javascript a la : btnUse.Attributes = "DoSomeJS()"; However when i try and get...
2
by: prabhupr | last post by:
Hi Folks I was reading this article (http://www.dotnetbips.com/articles/displayarticle.aspx?id=32) on "Custom Attribute", written by Bipin. The only thing I did not understand in this article...
2
by: james_027 | last post by:
hi everyone, I am now in chapter 5 of Dive Into Python and I have some question about it. From what I understand in the book is you define class attributes & data attributes like this in python...
2
by: cloftis | last post by:
Using VS2003, VB and MSHTML, Using an HTMLSpanElement I want to enumerate the attributes of a SPAN tag. 1 'For testing sake 2 Dim strMarkup as String = "<span attr1='somevalue'...
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: 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
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
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
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
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...
0
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...

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.