[opencms-dev] OpenCms 7.5.2: Howto use tool --Convert XML contents--
Fábio Gomes
fabio at w3bh.com.br
Tue Oct 30 12:14:26 CET 2012
Hello, I would like you to publish your question in the forum
http://www.opencmsforum.com to move it
Thank you.
*
*
*Fábio Gomes*
*Analista de sistemas - w3bh Tecnologia*
*http://www.w3bh.com.br*
*+55 31 3447-6201*
*skype: fabiogomes.ti*
2012/10/30 Schliemann, Kai <K.Schliemann at comundus.com>
> Hi list,
> I am trying to convert one xml content type to another using the "Convert
> XML contents" tool in the administration view of OpenCms.
> I don't get it to work.
> Can anybody tell me what I am doing wrong or provide a working example (I
> couldn't find one), please.
>
> Thank you very much in advance.
>
> Best regards
> Kai
>
> This is the message I get during transformation:
> #####################
> Resource path: /a/b/c/
> Inclusive sub folders: true
> Xslt file: /transform.xslt
> Only count files to transform: false
> New xsd main file: opencms://system/modules/
> module.name/schemas/overview.xsd
> Start searching for files to transform...
> Number of files found to transform: 2
> Transform (published) file (encoding type):
> /sites/default/a/b/c/d/content.html (UTF-8)
> Error while writing.
> Transform (published) file (encoding type):
> /sites/default/a/b/c/content1.html (UTF-8)
> Error while writing.
> Publishing files...
> Result:
> Number of files found to transform: 2
> Number of files already transformed: 0
> Number of errors while transforming: 2
> Number of locked files (could not become transformed): 0
> Transforming files failed.
> Finished transforming xml contents.
> Statistics:duration: 00:00:00
> #####################
>
> This is my setup:
>
> My xslt file for transformation:
> #####################
> <?xml version="1.0" ?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="opencms://system/modules/
> module.name/schemas/newschema.xsd"
> >
> <xsl:output method="xml" indent="yes"/>
> <xsl:template match="/">
> <Title><![CDATA[]]></Title>
> <Headline><xsl:value-of select="/headline"/></Headline>
> <BoxesPath><![CDATA[]]></BoxesPath>
> <BoxRubrikUebersicht>
> <BoxPic><xsl:value-of select="/teaserImage"/></BoxPic>
> <BoxTitle><xsl:value-of select="/teaserText"/></BoxTitle>
> <BoxText name="BoxText0">
> <links><xsl:value-of
> select="/mainText/links"/></links>
> <content><xsl:value-of
> select="/mainText/content"/></content>
> </BoxText>
> </BoxRubrikUebersicht>
> <LeftNavigationenBoxes>
> <Boxpath><![CDATA[]]></Boxpath>
> <BoxTransmissionIndex><![CDATA[]]></BoxTransmissionIndex>
> </LeftNavigationenBoxes>
> </xsl:template>
> <xsl:template match="*"/>
> </xsl:stylesheet>
> #####################
>
> New controlcode (contextmenu --> advanced --> edit controlcode)
> #####################
> <Overviews xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="opencms://system/modules/de.mwsg.spool.cms.modules.mastertemplates/schemas/newschema.xsd">
> <Overview language="de">
> <Title><![CDATA[mytitle]]></Title>
> <Headline><![CDATA[myheadline]]></Headline>
> <BoxesPath><![CDATA[/a/b/c/mybox.html]]></BoxesPath>
> <BoxRubrikUebersicht>
> <BoxPic><![CDATA[/_resources/images/Kategorie2.jpg]]></BoxPic>
> <BoxTitle><![CDATA[myboxtitle]]></BoxTitle>
> <BoxText name="BoxText0">
> <links/>
> <content><![CDATA[<p> kurzer Text</p>]]></content>
> </BoxText>
> </BoxRubrikUebersicht>
> <LeftNavigationenBoxes>
> <Boxpath><![CDATA[/a/b/c/mybox2.html]]></Boxpath>
> <BoxTransmissionIndex>true</BoxTransmissionIndex>
> </LeftNavigationenBoxes>
> </Overview>
> </Overviews>
> #####################
>
> Old controlcode (contextmenu --> advanced --> edit controlcode)
> #####################
> <Freitexts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="opencms://system/modules/
> module.name/schemas/oldschema.xsd">
> <Freitext language="de">
> <headline><![CDATA[myheadline]]></headline>
> <teaserImage/>
> <teaserText name="teaserText0">
> <links/>
> <content><![CDATA[Teaser-Text]]></content>
> </teaserText>
> <mainText name="mainText0">
> <links/>
> <content><![CDATA[content text]]></content>
> </mainText>
> </Freitext>
> </Freitexts>
> #####################
>
>
> _______________________________________________
> 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/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20121030/7f3860db/attachment.htm>
More information about the opencms-dev
mailing list