xsl-list
[Top] [All Lists]

Re: [xsl] XSD Question

2007-04-18 11:54:44
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(_dot_)a(_dot_)hunt(_at_)ge(_dot_)com> 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(_dot_)online(_at_)xs4all(_dot_)nl]
Sent: Wednesday, April 18, 2007 2:35 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] 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
>
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>
>
>
>
>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>