<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>
      &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
      &lt;?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> ?&gt;<br>
      <b>&lt;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"&gt;<br>
         &lt;title&gt;19-3-5 <br>
      ...<br>
      <br>
      To<br>
      <br>
      &lt;?xml version="1.0" encoding="UTF-8"?&gt;<br>
      &lt;?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> ?&gt;<br>
      <b>&lt;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"&gt;<br>
         &lt;title&gt;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>
          &lt;xsl:template match="/"&gt;<br>
              &lt;xsl:apply-templates select="*"/&gt;<br>
          &lt;/xsl:template&gt;<br>
      <br>
      <b>At top root element, I generate the new</b><b> PI before
        contents</b><br>
          &lt;xsl:template match="/*"&gt;<br>
              &lt;xsl:processing-instruction name="xml-model"&gt;
      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>&lt;/xsl:processing-instruction&gt;<br>
              &lt;patientsSous &gt;<br>
                  &lt;xsl:apply-templates select="node() | @*"/&gt;<br>
              &lt;/patientsSous&gt;<br>
          &lt;/xsl:template&gt;<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>