Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 9th, 2011, 02:34 PM
Authorized User
 
Join Date: Dec 2010
Posts: 16
Thanks: 5
Thanked 0 Times in 0 Posts
Default XSD newbie: need help finding resources to address specific need

I need to create my first XSD definition for a sample XML document. It has the following structure:
- It's a hierarchy of elements called containers of 4 types: Box -> Folder -> Doc -> Page.
- XML can have one or more boxes
- A box can have one or more folders
- A folder can have exactly one doc
- Doc can have one or more pages
- Each container type has its own properties, but some properties are shared, e.g. Box's date must be the same as its folder's date etc.

So a typical XMl file looks something like this:
Code:
<container type="Box">
    <property name="Date">01/20/2011</property>
    <property name="Name">Some box</property>
    <property name="Author">John Doe</property>
    <container type="Folder">
		<property name="Date">01/20/2011</property>
		<property name="Description">Some folder</property>
		<container type="Document">
			<property name="Location">Garbage bin</property>
			<property name="NumPages">2</property>
			<container type="Page">
				<property name="PageNumber">1</property>
				<property name="AssociatedFile" file="FilePage1.txt" />
			</container>
			<container>
				<property name="PageNumber">2</property>
				<property name="AssociatedFile" file="FilePage2.txt" />
			</container>
		</container>
	</container>
</container>
Rather starting reading about XSDs from scratch, I prefer to look at the components that would allow me to create a correct and concise definition given the above constraints. Can you tell me which XSD constructs I will need and whether there are specific web resources where these are covered well.

Thanks much
Reply With Quote
  #2 (permalink)  
Old May 19th, 2011, 03:41 AM
Registered User
 
Join Date: May 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default xml resources

takea look at w3c schools, thats fairly good for newbies
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding if an attribute has a specific value mphare XSLT 1 February 2nd, 2009 06:57 PM
Finding specific string martinrhague Access 7 November 2nd, 2006 12:54 PM
datagrids question -- finding a specific row bazookajoe76 C# 1 January 22nd, 2005 12:08 PM
NewBie Resources spraveens Beginning PHP 3 February 17th, 2004 10:54 AM
Finding a specific character within a string tp194 Classic ASP Databases 2 October 12th, 2003 10:41 PM



All times are GMT -4. The time now is 07:51 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.