<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Times New Roman, Times, serif">Hi,<br>
<br>
In an RNG 1.3 DITA environment, and I try to use the Oxygen
refactoring tool to enable users to convert from one topic type to
an other. <br>
<br>
For example, I want to convert <br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<?xml-model href="<b>iam.rng</b>" type="application/xml"
schematypens=<a class="moz-txt-link-rfc2396E" href="http://relaxng.org/ns/structure/1.0">"http://relaxng.org/ns/structure/1.0"</a> ?><br>
<b><iam</b>
xmlns:ditaarch=<a class="moz-txt-link-rfc2396E" href="http://dita.oasis-open.org/architecture/2005/">"http://dita.oasis-open.org/architecture/2005/"</a>
id="G19-3-5"><br>
<title>19-3-5 <br>
...<br>
<br>
To<br>
<br>
<?xml version="1.0" encoding="UTF-8"?><br>
<?xml-model href="<b>patientsSous.rng</b>"
type="application/xml"
schematypens=<a class="moz-txt-link-rfc2396E" href="http://relaxng.org/ns/structure/1.0">"http://relaxng.org/ns/structure/1.0"</a> ?><br>
<b><patientsSous</b>
xmlns:ditaarch=<a class="moz-txt-link-rfc2396E" href="http://dita.oasis-open.org/architecture/2005/">"http://dita.oasis-open.org/architecture/2005/"</a>
id="G19-3-5"><br>
<title>19-3-5 <br>
...<br>
<br>
I've no problem to transform XML elements using a refactoring XSLT
stylesheet but this does not affects the top front PI.<br>
<br>
My stylesheet :<br>
<br>
<b>At document level, I remove any previous PI</b><br>
<xsl:template match="/"><br>
<xsl:apply-templates select="*"/><br>
</xsl:template><br>
<br>
<b>At top root element, I generate the new</b><b> PI before
contents</b><br>
<xsl:template match="/*"><br>
<xsl:processing-instruction name="xml-model">
href="patientsSous.rng" type="application/xml"
schematypens=<a class="moz-txt-link-rfc2396E" href="http://relaxng.org/ns/structure/1.0">"http://relaxng.org/ns/structure/1.0"</a></xsl:processing-instruction><br>
<patientsSous ><br>
<xsl:apply-templates select="node() | @*"/><br>
</patientsSous><br>
</xsl:template><br>
<br>
<br>
</font><br>
<font face="Times New Roman, Times, serif"><font face="Times New
Roman, Times, serif">So, it is likely if using the refactoring
tool, the stylesheet is applied only to root element, not the PI
in front of the root element</font>.<br>
<br>
Is it really the case ? A bug ? Anyone knows how to also modify
the top front PI ?<br>
<br>
<br>
Regards, Pierre<br>
<br>
<br>
</font>
</body>
</html>