[opencms-dev] Field configuration - OpenCms Search

Claus Priisholm cpr at codedroids.com
Mon Nov 10 15:12:48 CET 2008


I have not tried to index an image path as in your example but I would 
think you should just write Photo[1]/Image[1] The link and target tags 
are "implementation details" and are hidden by OpenCms' own APIs (if you 
want to access the document with DOM or likewise API you have to take 
them into consideration, but this is not the case here as far as I 
understand your question)

Andrea Puddu wrote:
> 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
>>
>>   
> 
> _______________________________________________
> 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
> 

-- 
Claus Priisholm, CodeDroids ApS
Phone: +45 48 22 46 46
cpr (you know what) codedroids.com - http://www.codedroids.com
cpr (you know what) interlet.dk - http://www.interlet.dk
-- 
Javadocs and other OpenCms stuff: 
http://www.codedroids.com/community/opencms




More information about the opencms-dev mailing list