[opencms-dev] Field configuration - OpenCms Search

Andrea Puddu docpuddu at tiscali.it
Fri Oct 24 15:20:47 CEST 2008


In the XSD for the content I have:

....
....
<xsd:complexType name="OpenCmsContent">
        <xsd:sequence>
                    <xsd:element name="Section" type="OpenCmsString" />
        ....         
            <xsd:element name="Photo" type="OpenCmsImage"/>
       ...

And Photo (i.e. OpenCmsImage) in detail is

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">
   
    <xsd:include schemaLocation="opencms://opencms-xmlcontent.xsd"/>   
    <xsd:element name="Images" type="OpenCmsImages"/>
   
    <xsd:complexType name="OpenCmsImages">
        <xsd:sequence>
            <xsd:element name="Image" type="OpenCmsImage" minOccurs="0" 
maxOccurs="unbounded"/>
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="OpenCmsImage">
        <xsd:sequence>
            <xsd:element name="Image" type="OpenCmsVarLink" minOccurs="0" />
            <xsd:element name="Description" type="OpenCmsString" />
        </xsd:sequence>
        <xsd:attribute name="language" type="OpenCmsLocale" use="optional"/>
    </xsd:complexType>

    <xsd:annotation>
        <xsd:appinfo>
            <layouts>
                <layout element="Image" widget="ImageGalleryWidget" 
/>           
            </layouts>
            <relations>
                <relation element="Image" invalidate="parent" 
type="strong" />
            </relations>
        </xsd:appinfo>
    </xsd:annotation> 
</xsd:schema>

Thanks,
Andrea

---------------------------
Andrea Puddu
docpuddu at tiscali dot it
http://www.linkedin.com/in/andreapuddu
-------------------------------------------



Juan Francisco Fernández ha scritto:
> If you get the field Photo[1]/Image/link, it would retrieve the target
> field, at least if you XSD configuration is similar at the OpenCms examples.
>
> Can you post your XSD schema for the Photo type?
>
>   

> [..cut...]



More information about the opencms-dev mailing list