Feeds

Build business-ready XML Schema with JDeveloper

Communicate clearly

  • alert
  • submit to reddit

The Power of One eBook: Top reasons to choose HP BladeSystem

page break

A schema component may also be added by selecting a node in Design View and selecting a component in the Component Palette. A component may also be added from the Component Palette to a Design view component by selecting the component in the Component Palette and dragging the component to the Design view component and dropping the component. An element will be added to <schema> element. Set element name to catalog, and element type to catalogType in the Property Inspector.

Element name and type may also be specified by right-clicking on the element node and selecting Properties. In the element properties window specify element name and, in Advanced Properties, specify element type. In Advanced Properties abstract, block, default, final, fixed, id, nillable, and substitutionGroup values may also be specified. To delete exampleElement element, right-click on exampleElement node and select Delete. Next, add a complextType component to <schema> node from the Component Palette.

Set complexType name to catalogType. Add a sequence component to catalogType and add an element to the sequence. Set attribute ref to journal in the element node. Attribute name should not be set for an element if ref attribute is set. Specifying elements using the ref attribute has the advantage that XML documents may be instantiated from an XML Schema fragment.

When elements in a complexType component are specified using the ref attribute a corresponding global elements are also specified. When instantiating an XML document from the XML Schema any of the global elements may be selected as the root element. Also, set attribute minOccurs to 0, and maxOccurs to unbounded in the journal node. Next, add journal element to schema node.

Now, add a complexType component journalType to schema node. Add a sequence component to the journalType node and add an article element to the sequence. In the Property Inspector, set attribute ref to article, minOccurs to 0 and maxOccurs to unbounded.

Adding an xsd:element XML Schema Component to xsd:schema Element

When that's done, add attributes title, publisher, and edition to journalType. To add an attribute, select journalType node and select attribute in the component palette. Set attribute name to title, and type to xsd:string. Similarly, add attributes publisher and edition to journalType.

Add article element to schema node and set element type to articleType. Having added an element of type articleType, add a complexType component articleType. Next, add a sequence to articleType, add an element node to the sequence node, set element name to title, and type to xsd:string. Similarly, add element author of type xsd:string to the sequence.

HP ProLiant Gen8: Integrated lifecycle automation

More from The Register

next story
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
Do YOU work at Microsoft? Um. Are you SURE about that?
Nokia and marketing types first to get the bullet, says report
Microsoft takes on Chromebook with low-cost Windows laptops
Redmond's chief salesman: We're taking 'hard' decisions
Cheer up, Nokia fans. It can start making mobes again in 18 months
The real winner of the Nokia sale is *drumroll* ... Nokia
EU dons gloves, pokes Google's deals with Android mobe makers
El Reg cops a squint at investigatory letters
Chrome browser has been DRAINING PC batteries for YEARS
Google is only now fixing ancient, energy-sapping bug
Big Blue Apple: IBM to sell iPads, iPhones to enterprises
iOS/2 gear loaded with apps for big biz ... uh oh BlackBerry
prev story

Whitepapers

Reducing security risks from open source software
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
Application security programs and practises
Follow a few strategies and your organization can gain the full benefits of open source and the cloud without compromising the security of your applications.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Consolidation: the foundation for IT and business transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.