<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=451524814-05052006><FONT face=Arial 
color=#0000ff size=2>Unfortunately the XSD handling seems to be fairly 
hardwired, so I don't think there's any way of doing what you want.   
I don't believe it's even possible to use <xsd:choice>, for 
example...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=451524814-05052006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=451524814-05052006><FONT face=Arial 
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org 
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of 
</B>schuchhardt@inverso.de<BR><B>Sent:</B> 05 May 2006 15:31<BR><B>To:</B> 
opencms-dev@opencms.org<BR><B>Subject:</B> [opencms-dev] xsd: defintion of 
attributes<BR></FONT><BR></DIV>
<DIV></DIV><BR><FONT face=sans-serif size=2>Hi everybody,</FONT> <BR><BR><FONT 
face=sans-serif size=2>I´m trying to realize the following xml-file to be 
editable in OpenCms with</FONT> <BR><FONT face=sans-serif size=2>structured 
content. Till now I worked with the examples in the documentation and everything 
was ok.</FONT> <BR><FONT face=sans-serif size=2>I searched the mailing list but 
I found nothing similar. </FONT><BR><FONT face=sans-serif size=2>Besides I´ve 
 got the opinion that it is only possible to implement nothing execpt the 
given examples .</FONT> <BR><FONT face=sans-serif size=2>The complex types for 
example seem not to be allowed to have more than the language attribute.</FONT> 
<BR><FONT face=sans-serif size=2>When I try to define some further attributes to 
complex types of the xsd, I alwyas get errors.</FONT> <BR><BR><FONT 
face=sans-serif size=2>Has anybody succesfully written schema definitions for a 
xml file like that?</FONT> <BR><BR><FONT face=sans-serif size=2>    
    <?xml version="1.0" encoding="ISO-8859-1"?></FONT> <BR><FONT 
face=sans-serif size=2>        <Productinhalt 
Version="2.1.0" Name="Konfiguration"></FONT> <BR><FONT face=sans-serif 
size=2>                 <Product 
Key="02001"  Name="" ProductServer=""  ProductPort="52224" 
ProductPath=""></FONT> <BR><FONT face=sans-serif size=2>      
            </Product></FONT> <BR><FONT 
face=sans-serif size=2>                
 <Product Key="23001" Name="" ProductServer="" ProductPort="52224" 
ProductPath=""></FONT> <BR><FONT face=sans-serif size=2>      
          </Product></FONT> <BR><FONT 
face=sans-serif size=2>        </Productinhalt></FONT> 
<BR><BR><BR><FONT face=sans-serif size=2>My last working schema looked like 
this, but it is only possible with diffentent elements, not with several 
attributes.</FONT> <BR><BR><FONT face=sans-serif size=2><xsd:schema 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified"></FONT> <BR><FONT face=sans-serif 
size=2><xsd:include 
schemaLocation="opencms://opencms-xmlcontent.xsd"/></FONT> <BR><FONT 
face=sans-serif size=2>        <xsd:element 
name="Productinhalts" type="OpenCmsProductinhalts" /></FONT> <BR><FONT 
face=sans-serif size=2>        </FONT><BR><FONT 
face=sans-serif size=2>        <xsd:complexType 
name="OpenCmsProductinhalts"></FONT> <BR><FONT face=sans-serif size=2>  
              <xsd:sequence></FONT> 
<BR><FONT face=sans-serif size=2>            
            <xsd:element name="Productinhalt" 
type="OpenCmsProductinhalt" minOccurs="0" maxOccurs="unbounded"/></FONT> 
<BR><FONT face=sans-serif size=2>            
    </xsd:sequence></FONT> <BR><FONT face=sans-serif 
size=2>        </xsd:complexType></FONT> <BR><BR><FONT 
face=sans-serif size=2>        <xsd:complexType 
name="OpenCmsProductinhalt"></FONT> <BR><FONT face=sans-serif size=2>  
              <xsd:sequence></FONT> 
<BR><FONT face=sans-serif size=2>            
            <xsd:element name="Key" 
type="OpenCmsString" /></FONT> <BR><FONT face=sans-serif size=2>    
                    
<xsd:element name="Name" type="OpenCmsString" /></FONT> <BR><FONT 
face=sans-serif size=2>                
        <xsd:element name="ProductServer" 
type="OpenCmsString" /></FONT> <BR><FONT face=sans-serif size=2>    
                    
<xsd:element name="ProductPort" type="OpenCmsString" /></FONT> <BR><FONT 
face=sans-serif size=2>                
        <xsd:element name="ProductPath" 
type="OpenCmsString" /></FONT> <BR><FONT face=sans-serif size=2>    
            </xsd:sequence></FONT> <BR><FONT 
face=sans-serif size=2>                
<xsd:attribute name="language" type="OpenCmsLocale" use="required" 
/></FONT> <BR><FONT face=sans-serif size=2>        
</xsd:complexType>        </FONT> <BR><FONT 
face=sans-serif size=2>        </FONT><BR><FONT 
face=sans-serif size=2>        <xsd:annotation></FONT> 
<BR><FONT face=sans-serif size=2>            
    <xsd:appinfo>             
           </FONT> <BR><FONT face=sans-serif 
size=2>                    
    <resourcebundle name="de.inverso.vkb.vp.workplace"/></FONT> 
<BR><FONT face=sans-serif size=2>            
            <mappings/></FONT> <BR><FONT 
face=sans-serif size=2>                
        <defaults/></FONT> <BR><FONT face=sans-serif 
size=2>                    
    <layouts/></FONT> <BR><FONT face=sans-serif size=2>  
              </xsd:appinfo></FONT> 
<BR><FONT face=sans-serif size=2>        
</xsd:annotation>  </FONT> <BR><FONT face=sans-serif 
size=2> </xsd:schema></FONT> <BR><BR><BR><FONT face=sans-serif 
size=2>Result xml file:</FONT> <BR><BR><FONT face=sans-serif size=2><?xml 
version="1.0" encoding="UTF-8"?></FONT> <BR><FONT face=sans-serif 
size=2><Productinhalts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:noNamespaceSchemaLocation="opencms://system/modules/de.inverso.vkb.vp/schemas/vp_content.xsd"></FONT> 
<BR><FONT face=sans-serif size=2>  <Productinhalt 
language="en"></FONT> <BR><FONT face=sans-serif size=2>    
<Product></FONT> <BR><FONT face=sans-serif size=2>      
<Key><![CDATA[02001]]></Key></FONT> <BR><FONT face=sans-serif 
size=2>      <Name/></FONT> <BR><FONT face=sans-serif 
size=2>      <ProductServer/></FONT> <BR><FONT 
face=sans-serif size=2>      
<ProductPort><![CDATA[52224]]></ProductPort></FONT> <BR><FONT 
face=sans-serif size=2>      <ProductPath/></FONT> 
<BR><FONT face=sans-serif size=2>    </Product></FONT> <BR><FONT 
face=sans-serif size=2>    <Product></FONT> <BR><FONT 
face=sans-serif size=2>      
<Key><![CDATA[23001]]></Key></FONT> <BR><FONT face=sans-serif 
size=2>      <Name/></FONT> <BR><FONT face=sans-serif 
size=2>      <ProductServer/></FONT> <BR><FONT 
face=sans-serif size=2>      
<ProductPort><![CDATA[52224]]></ProductPort></FONT> <BR><FONT 
face=sans-serif size=2>      <ProductPath/></FONT> 
<BR><FONT face=sans-serif size=2>    </Product></FONT> <BR><FONT 
face=sans-serif size=2>  </Productinhalt></FONT> <BR><FONT 
face=sans-serif size=2></Productinhalts></FONT> <BR><BR><BR><FONT 
face=sans-serif size=2>Thanks for your help!</FONT> <BR><BR><FONT 
face=sans-serif size=2>Best regards,</FONT> <BR><BR><FONT face=sans-serif 
size=2>Nadine Schuchhardt</FONT> <BR></BODY></HTML>