<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Kai,<br>
<br>
my XSL file would looks like:<br>
<br>
<tt><?xml version="1.0" encoding="UTF-8"?></tt><tt><br>
</tt><tt><xsl:stylesheet version="2.0"
xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a>></tt><tt><br>
</tt><tt> <xsl:output method="xml" media-type="text/xml"
cdata-section-elements="content" /></tt><tt><br>
</tt><tt> <xsl:template match="/"></tt><tt><br>
</tt><tt> <Overviews
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="opencms://system/modules/de.mwsg.spool.cms.modules.mastertemplates/schemas/newschema.xsd"></tt><tt><br>
</tt><tt> <xsl:apply-templates/></tt><tt><br>
</tt><tt> </Overviews></tt><tt><br>
</tt><tt> </xsl:template></tt><tt><br>
</tt><tt> <xsl:template match="Freitext"></tt><tt><br>
</tt><tt> <xsl:element name="Overview"></tt><tt><br>
</tt><tt> <xsl:attribute
name="language"><xsl:value-of select="@language"
/></xsl:attribute></tt><tt><br>
</tt><tt> <Title><xsl:value-of
select="Titel"/></Title></tt><tt><br>
</tt><tt> <!-- ... the rest of the elements --></tt><tt><br>
</tt><tt> </xsl:element></tt><tt><br>
</tt><tt> </xsl:template></tt><tt><br>
</tt><tt></xsl:stylesheet></tt><tt><br>
</tt><br>
<br>
Be sure that the XSD File of the new type allow empty elements or
the temporary absence of all elements ( minOccurs="0" ). This makes
the job easier. <br>
<br>
Regards<br>
Holger<br>
<br>
<div class="moz-cite-prefix">Am 30.10.2012 12:00, schrieb
Schliemann, Kai:<br>
</div>
<blockquote class=" cite"
id="mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com"
cite="mid:38B19AD8C321A9478F287F25365F776B0F9EA5DD@AM2PRD0311MB423.eurprd03.prod.outlook.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style>#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com p.MsoNormal,
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com li.MsoNormal,
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com div.MsoNormal { margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: "Calibri","sans-serif"; }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com a:link,
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.MsoHyperlink { color: blue; text-decoration: underline; }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com a:visited,
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.MsoHyperlinkFollowed { color: purple; text-decoration: underline; }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.E-MailFormatvorlage17 { font-family: "Calibri","sans-serif"; color: windowtext; }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.note { }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.ok { }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com span.err { }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com .MsoChpDefault { font-family: "Calibri","sans-serif"; }
#mid_38B19AD8C321A9478F287F25365F776B0F9EA5DD_AM2PRD0311MB423_eurprd03_prod_outlook_com div.WordSection1 { page: WordSection1; }
</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi list,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I am trying to convert
one xml content type to another using the “Convert XML
contents” tool in the administration view of OpenCms.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I don’t get it to work.
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Can anybody tell me what
I am doing wrong or provide a working example (I couldn’t
find one), please.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thank you very much in
advance.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Kai<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">This is the message I
get during transformation:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span class="note"><span lang="EN-US">Resource
path: /a/b/c/</span></span><span lang="EN-US"><br>
<span class="note">Inclusive sub folders: true</span><br>
<span class="note">Xslt file: /transform.xslt</span><br>
<span class="note">Only count files to transform: false</span><br>
<span class="note">New xsd main file:
opencms://system/modules/module.name/schemas/overview.xsd</span><br>
<span class="note">Start searching for files to transform...</span><br>
<span class="ok">Number of files found to transform: 2</span><br>
<span class="ok">Transform (published) file (encoding type):
/sites/default/a/b/c/d/content.html (UTF-8)</span><br>
<span class="err">Error while writing.</span><br>
<span class="ok">Transform (published) file (encoding type):
/sites/default/a/b/c/content1.html (UTF-8)</span><br>
<span class="err">Error while writing.</span><br>
<span class="note">Publishing files...</span><br>
<span class="note">Result:</span><br>
<span class="note">Number of files found to transform: 2</span><br>
<span class="note">Number of files already transformed: 0</span><br>
<span class="note">Number of errors while transforming: 2</span><br>
<span class="note">Number of locked files (could not become
transformed): 0</span><br>
<span class="err">Transforming files failed.</span><br>
</span><span class="note">Finished transforming xml contents.</span><br>
Statistics:duration: 00:00:00<o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">This is my setup:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">My xslt file for
transformation:<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><?xml version="1.0" ?><o:p></o:p></p>
<p class="MsoNormal"><xsl:stylesheet version="1.0" <o:p></o:p></p>
<p class="MsoNormal">
xmlns:xsl=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/XSL/Transform">"http://www.w3.org/1999/XSL/Transform"</a> <o:p></o:p></p>
<p class="MsoNormal"> <span lang="EN-US">xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="opencms://system/modules/module.name/schemas/newschema.xsd"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <xsl:output
method="xml" indent="yes"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <xsl:template
match="/"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Title><![CDATA[]]></Title><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Headline><xsl:value-of
select="/headline"/></Headline><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxesPath><![CDATA[]]></BoxesPath><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxRubrikUebersicht><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxPic><xsl:value-of
select="/teaserImage"/></BoxPic><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxTitle><xsl:value-of
select="/teaserText"/></BoxTitle><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxText name="BoxText0"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<links><xsl:value-of
select="/mainText/links"/></links><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<content><xsl:value-of
select="/mainText/content"/></content><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</BoxText><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</BoxRubrikUebersicht><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<LeftNavigationenBoxes><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Boxpath><![CDATA[]]></Boxpath><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxTransmissionIndex><![CDATA[]]></BoxTransmissionIndex><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</LeftNavigationenBoxes><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </xsl:template><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <xsl:template
match="*"/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"></xsl:stylesheet><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">New controlcode
(contextmenu </span></b><b><span
style="font-family:Wingdings" lang="EN-US">à</span></b><b><span
lang="EN-US"> advanced </span></b><b><span
style="font-family:Wingdings" lang="EN-US">à</span></b><b><span
lang="EN-US"> edit controlcode)<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><Overviews
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="opencms://system/modules/de.mwsg.spool.cms.modules.mastertemplates/schemas/newschema.xsd"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <Overview
language="de"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Title><![CDATA[mytitle]]></Title><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Headline><![CDATA[myheadline]]></Headline><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxesPath><![CDATA[/a/b/c/mybox.html]]></BoxesPath><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </span><BoxRubrikUebersicht><o:p></o:p></p>
<p class="MsoNormal"> <span lang="EN-US"><BoxPic><![CDATA[/_resources/images/Kategorie2.jpg]]></BoxPic><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxTitle><![CDATA[myboxtitle]]></BoxTitle><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <BoxText
name="BoxText0"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <links/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<content><![CDATA[<p> kurzer
Text</p>]]></content><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </BoxText><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</BoxRubrikUebersicht><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<LeftNavigationenBoxes><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<Boxpath><![CDATA[/a/b/c/mybox2.html]]></Boxpath><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<BoxTransmissionIndex>true</BoxTransmissionIndex><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
</LeftNavigationenBoxes><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </Overview><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"></Overviews><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">Old controlcode
(contextmenu </span></b><b><span
style="font-family:Wingdings" lang="EN-US">à</span></b><b><span
lang="EN-US"> advanced </span></b><b><span
style="font-family:Wingdings" lang="EN-US">à</span></b><b><span
lang="EN-US"> edit controlcode)<o:p></o:p></span></b></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><Freitexts
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:noNamespaceSchemaLocation="opencms://system/modules/module.name/schemas/oldschema.xsd"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <Freitext
language="de"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<headline><![CDATA[myheadline]]></headline><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <teaserImage/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <teaserText
name="teaserText0"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <links/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<content><![CDATA[Teaser-Text]]></content><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </teaserText><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <mainText
name="mainText0"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> <links/><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">
<content><![CDATA[content
text]]></content><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </mainText><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> </Freitext><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"></Freitexts><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">#####################<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
_________________________________________
Holger Kunicke
Webentwickler
AV-Studio Kommunikationsmedien GmbH Halle
Stephanusstraße 2
06114 Halle (Saale)
Tel.: +49 (0) 345 20 999 -0
Fax: +49 (0) 345 20 999 -20
Mail: <a class="moz-txt-link-abbreviated" href="mailto:holger.kunicke@av-studio.de">holger.kunicke@av-studio.de</a>
Web: <a class="moz-txt-link-abbreviated" href="http://www.av-studio.de">www.av-studio.de</a>
HRB 11368
Ust-Id-Nr.: DE 191537712
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
</pre>
</body>
</html>