[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSD Question

Subject: Re: XSD Question
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 18 Apr 2007 20:56:16 +0200
Re:  XSD Question
errr, Steve..., there is no template at all, it is (was) about XSD...

Steve wrote:
Why don't you try simply doing an apply-template select="/" and see if
you get output.

My first guess would be that your templates aren't really matching anything.

-S

On 4/18/07, Hunt, James A (GE, Corporate, consultant)
<james.a.hunt@xxxxxx> wrote:
Thanks Abel...I know this is not a XSD forum but I figured you guys
would easily be able to answer this question.

Thanks again!


-----Original Message----- From: Abel Braaksma [mailto:abel.online@xxxxxxxxx] Sent: Wednesday, April 18, 2007 2:35 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: XSD Question

Hunt, James A (GE, Corporate, consultant) wrote:
> Hi Everyone!
>
> Can you tell me how to make this field required using this XSD?
>

  1. This is an XSLT list, I fail to see the connection....
  2. What does "this field" refer to?

Nevertheless, here's a rough guide:

 a) Making an element required in XSD can be done by *not* setting the
minOccurs attribute, or setting it to "1".
 b) Making an attribute required in an XSD is done by setting it's "use"

attribute to "required". The default is optional.

Cheers,
-- Abel
> <?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"yes"?>
> <xs:schema xmlns:xs=3D"http://www.w3.org/2001/XMLSchema"
> elementFormDefault=3D"qualified">
>       <xs:element name=3D"assignedto">
>               <xs:simpleType>
>                       <xs:restriction base=3D"xs:string"/>
>               </xs:simpleType>
>       </xs:element>
>       <xs:element name=3D"request">
>               <xs:complexType>
>                       <xs:choice maxOccurs=3D"unbounded">
>                               <xs:element ref=3D"assignedto"/>
>
>                       </xs:choice>
>               </xs:complexType>
>       </xs:element>
>       <xs:element name=3D"requests">
>               <xs:complexType>
>                       <xs:sequence>
>                               <xs:element ref=3D"request"
> maxOccurs=3D"unbounded"/>
>                       </xs:sequence>=09
>               </xs:complexType>
>       </xs:element>
> </xs:schema>
>
> Thanks!
> James

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.