You'll have to redesign the model.  As shown in your schema, list
types are simpleTypes.  Since the lexical representation is
comma-separated instances of the member type, that type also must be a
simpleType.  The normal use is to allow an element attribute to have
multiple values, e.g.:

  <book isbn="1234,2345,2363"/>

DvText is far too complex for its document form to appear in an
attribute value.  I'm not sure if you're trying to use it to get a
recursive data structure (in which case use a ref of DvText with
maxOccurs="unbounded" as the element content in DvParagraph), or if
you mean the itemType to not be a DvText value but a string
identifying a restriction/extension of DvAny that will allow somebody
to identify the type of the element.  In that case, look into
xsi:type, or if you don't want to use that, provide a restriction of
xsd:ID or some such as the itemType.

Peter

On Thu, Apr 21, 2011 at 2:13 AM, Timothy Cook
<timothywayne.c...@gmail.com> wrote:
> Hi,
>
> I am defining several complex types with some of the elements being a list
> of one of the other complex types.
> Using pyxbgen I get this trace back:
>
> File "/usr/local/lib/python2.7/dist-packages/pyxb/xmlschema/structures.py",
> line 4315, in __completeResolution
>     raise pyxb.SchemaValidationError('Unable to locate STD %s for items' %
> (it_en,))
> SchemaValidationError: Unable to locate STD
> {http://www.mlhim.org/mlhim2}DvText for items
>
> The schema components are:
>
>            <xs:complexType name="DvText" abstract="false">
>            <xs:complexContent>
>            <xs:extension  base="mlhim2:DvAny">
>               <xs:sequence>
>                 <xs:element name="uuid" maxOccurs="1" minOccurs="1"
> type="xs:string" nillable="false"></xs:element>
>                 <xs:element name="language" maxOccurs="1" minOccurs="0"
> type="xs:language" nillable="true"></xs:element>
>                 <xs:element name="dv" maxOccurs="1" minOccurs="0"
> type="xs:string" nillable="true"></xs:element>
>               </xs:sequence>
>                </xs:extension>
>                </xs:complexContent>
>            </xs:complexType>
>
>               <xs:simpleType name="textList">
>              <xs:list itemType="mlhim2:DvText"></xs:list>
>            </xs:simpleType>
>
>            <xs:complexType name="DvParagraph" abstract="false">
>            <xs:complexContent>
>            <xs:extension base="mlhim2:DvAny" >
>              <xs:sequence>
>                <xs:element name="items" maxOccurs="1" minOccurs="0"
> type="mlhim2:textList" nillable="false"></xs:element>
>              </xs:sequence>
>                </xs:extension>
>                </xs:complexContent>
>            </xs:complexType>
>
> From what I understand I may not be able to use a complex type as the
> itemType for textList.  ???
> How can I solve/work around this issue?
>
> Thanks,
> Tim
>
>
>
>
>
>
>
>
>
> --
> ================
> Timothy Cook, MSc
> Project Lead - Multi-Level Healthcare Information Modeling
> http://www.mlhim.org
>
> LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook
> Skype ID == timothy.cook
> Academic.Edu Profile: http://uff.academia.edu/TimothyCook
>
> You may get my Public GPG key from  popular keyservers or
> from this link http://timothywayne.cook.googlepages.com/home
>
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> pyxb-users mailing list
> pyxb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pyxb-users
>
>

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
pyxb-users mailing list
pyxb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyxb-users

Reply via email to