You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "JamesLiao (JIRA)" <je...@portals.apache.org> on 2005/05/28 05:46:52 UTC

[jira] Updated: (JS2-268) Persistent PageLocalizedFieldImpl object to PSML omit xml:lang attribute

     [ http://issues.apache.org/jira/browse/JS2-268?page=all ]

JamesLiao updated JS2-268:
--------------------------

    Attachment: patch.zip

I have fixed it. Change page-mapping.xml file:
  <class name="org.apache.jetspeed.om.page.psml.PageLocalizedFieldImpl">
    <map-to xml="metadata"/>

	<field name="name" type="java.lang.String">
      <bind-xml name="name" node="attribute"/>
    </field>

    <field name="language" type="java.lang.String">
      <bind-xml name="xml:lang" node="attribute"/>
    </field>

    <field name="value" type="java.lang.String">
      <bind-xml node="text"/>
    </field>
  </class>

and add method named getLanguage() in class LocalizedFieldImpl like this:
    public String getLanguage()
    {
    	return locale.toString();
    }

please check the patch in the attachment.

> Persistent PageLocalizedFieldImpl object to PSML omit xml:lang attribute
> ------------------------------------------------------------------------
>
>          Key: JS2-268
>          URL: http://issues.apache.org/jira/browse/JS2-268
>      Project: Jetspeed 2
>         Type: Bug
>   Components: PSML
>     Versions: 2.0-M3
>  Environment: WinXP SP2, JDK1.4.2_07
>     Reporter: JamesLiao
>     Priority: Critical
>  Attachments: patch.zip
>
> When a PSML file contains multi-language metadata as following snapshot:
>   ......
>   <metadata name="title" xml:lang="fr">
> 		Ma Premiere Page de PSML
>   </metadata>
>     <metadata name="title" xml:lang="ja">
> 		Jetspeed 2 ?????
>   </metadata>
>   ......
> If you change this PSML file in admin mode, CastorFileSystemDocumentHandler will renew the PSML file, then the xml:lang attribute will be lost, like this:
>   ......
>   <metadata name="title">
> 		Ma Premiere Page de PSML
>   </metadata>
>     <metadata name="title">
> 		Jetspeed 2 ?????
>   </metadata>
>   ......

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org