Help me write a schema file: server.xsd
Hussein Badakhchani's Blog |
April 9, 2008 2:35 AM
|
Comments (2)
I have finally got back to work on a code share project I had been neglecting for sometime due to distractions at work. Now that I have aligned my work with the project the pressure is on again and work on Genesis (not to be confused with BEA's miserable application of the same name) has started with a vengence.
I will be mopping up the codeshare repository and blowing away the cob webs from the source over the next few days. Anyway in the spirit of Choom the predecessor of Genesis I wanted to invite the dev2dev community to help me write 'proper' code by criticizing, ridiculing and poking fun at my efforts, so here goes.
I need to write an XML schema file to represent the logical and physical properties associated with a server. For instance the kind of information I want in an XML instance of the schema would be the servers Manufacturer, architecture, supplier, network interface cards etc, etc.
This is what I have come up with so far:
<!--
The Genesis schema for a Server. This file defines both the
physical and logical properties of a server.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Server">
<xs:complexType>
<xs:sequence>
<xs:element name="manufacturer" type="xs:Manufacturer" />
<xs:element name="supplier" type="xs:Supplier" />
<xs:element name="model" type="xs:Model" />
<xs:element name="arch" type="xs:Architecture" />
<xs:element name="os" type="xs:OperatingSystem" />
<xs:element name="memory" type="xs:Memory" />
<xs:element name="nic" type="xs:NetworkInterfaceCard" />
<xs:element name="sic" type="xs:SanInterfaceCard" />
<xs:element name="function" type="xs:Function" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Manufacturer">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Supplier">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Model">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Architecture">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="OperatingSystem">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Memory">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="NetworkInterfaceCard">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="SanInterfaceCard">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="Function">
<xs:sequence>
<xs:element name="Name" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
The kind of things I would like feedback on are:
- XML coding standards, white spaces, comments, casing etc.
- Defining my complex types and suggestions for new types to include in the schema for server.
- Exising examples of similar shcemas.
I know I should post this to the forums put I felt I had to displace blog enteries on SOA at dev2dev.
Comments
Comments are listed in date ascending order (oldest first) | Post Comment
-
Some suggestions:
1. SAN Interface Card should be Host Bus Adapter (HBA).
2. I guess by function you mean server role? If so change the label to role and maybe include primary, secondary and tertiary.
3. I'm guessing you want to include common hardware types e.g disks (SCSI,SATA etc) and configuration data e.g TCP network information, RAID details etc.
My suggestions are engineer orientated. I'm putting myself in the shoes of poor guy who has to support these boxes. The kind of information I have suggested above should make his life easier.
You got your work cut out so don't choom around.
Posted by: salimb on April 9, 2008 at 8:20 AM
-
Conference and Workshop on Java Enterprise, Agile, JDK, Mobile, Spring, BPEL, EJB 3, Eclipse, Java EE, Cloud Computing and more..
If you work on Java there's no way you can afford to miss the Daring Java Conference @ Developer Summit 2008, being held May 22-23 in Bangalore. And there's no reason to either. The first-of-its-kind conference offers the ultimate value of leading-edge skills and luminary speakers from the works over. From frameworks and middleware technologies to Open Source Java, Java Mobile, and real time technologies, you will come back to work more productive and valuable to your company. So if you're keen on taking your knowledge and your capabilities beyond mere industry standards, you know where you need to be!
To know more about the benefits and the registration procedure visit the summit on the Web http://developersummit.com/conference.html#java.
On May 23 2008, Java technology transitions into teenage years. Celebrate this achievement at the 'Java Teenage Party' on the evening May 23, which will conclude the Daring Java conference.
You will not find talks of this caliber at other events. Some very good speakers are already lined up (http://developersummit.com/speakers.html)
• The Future of Enterprise Java by Jim Farley
• Building Java-based Cloud Architectures by Amazon's Jinesh Varia
• Using Persistent Java Objects in Multiple Tiers by Craig Russell
• Enterprise Mashups Using Java by Greg Murray
• Java Performance Tooling by Holly Cummins
• Beginning Drools - Rule Engines in Java by Brian Sam-Bodden
• Develop Secured Ajax Applications by Olivier Poupeney
• Leveraging Open Source in Java EE Projects by Peter Thomas
• Web Services Development in Java without JEE by Sanjaya Karunasena
• Ajax and Comet: Implementing the Real-Time Web by Alessandro Alinone
• EJB 3 Java Persistence API in Action by Deb Panda
The workshops include:
• Workshop: Rich Internet Applications with Flex and Java
• Workshop: Master Class: The Elements of User Experience
• Workshop: SQL Server 2008 Deep Dive
• Workshop: Java Data Objects Tutorial
• Workshop: Wicket, Spring and Hibernate: Putting It all Together
• Workshop: Harnessing Domain-Specific Languages (DSLs)
• Workshop: Parachuting Into Brownfields
• Workshop: Acceptance Test-Driven Development
You can register online: http://developersummit.com/registration.html
Thanks,
#3/18, Corporation Buildiing, Residency Road, Bangalore - 560 025
ph +91 80 4005 1000 Fax: +91 80 2221 0148 Email: info@saltmarchmedia.com
Conference venue: J N Tata Auditorium IIsc, Bangalore- 560025
Posted by: Shaguf on April 15, 2008 at 4:36 AM
|