[opencms-dev] Field configuration - OpenCms Search

Andrea Puddu docpuddu at tiscali.it
Tue Nov 4 16:18:22 CET 2008


Since in the xml article I have

-....
<Photo>
      <Image>
        <link internal="true" type="STRONG">
          
<target><![CDATA[/sites/mysite/canali/agencies/media/08/09/05/5fb824cdcb4933a52689c6749a9fb31e.jpg]]></target>
          <uuid>d8c1d325-7b64-11dd-8442-b167113d73a7</uuid>
        </link>
      </Image>
      <Description><![CDATA[descrizione]]></Description>
    </Photo>
....


In order to extract the image's VFS path I have to map the field with 
the following

Photo[1]/Image[1]/link[1]/target[1]

but unfortunately it doesn't work.

When I try another mapping like:

Photo[1]/Description[1]

I can get 'descrizione' successfully.

Which is the problem with the Photo/Image case?


/Andrea



Andrea Puddu ha scritto:
> Hi Juan Francisco,
> any idea after seeing the XSD you asked to post?
>
> Thanks,
> /A
>
> Andrea Puddu ha scritto:
>   
>> 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...]
>>>     
>>>       
>> _______________________________________________
>> This mail is sent to you from the opencms-dev mailing list
>> To change your list options, or to unsubscribe from the list, please visit
>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>
>>   
>>     
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>   



More information about the opencms-dev mailing list