Same Indent in converted output xml

"Byomokesh Sahoo [email protected]" <[email protected]> Thu, 15 Apr 2021 04:32:12 -0000
Newsgroups gmane.text.xml.xsl.general.mulberrytech
Message-ID <[email protected]>
--00000000000029019e05bffb57ad
Content-Type: text/plain; charset="UTF-8"

Hi,

Any way to same indentation will appear while converting One XML to Another
XML format. I am using indent="yes" but the same indent does not appear in
converted output xml.

I can not use xsl:copy because I have to apply one format to another format
with different scenarios.

*XSL:*

<xsl:output indent="yes" method="xml" />

*INPUT:*
<journal-meta>
<journal-id journal-id-type="publisher-id">ier</journal-id>
<journal-id journal-id-type="publisher-acronym">IERO</journal-id>
<journal-title-group>
<journal-title>Expert</journal-title>
</journal-title-group>
<issn publication-format="print">159</issn>
</journal-meta>

*OUTPUT:*
      <journal-meta>
         <journal-id journal-id-type="CAT">IERO</journal-id>
         <journal-id journal-id-type="publisher">IERO</journal-id>
         <journal-title-group>
            <journal-title>Expert</journal-title>
         </journal-title-group>
         <issn publication-format="print">159</issn>
      </journal-meta>

EXPECTED OUTPUT:

<journal-meta>
<journal-id journal-id-type="publisher-id">ier</journal-id>
<journal-id journal-id-type="publisher-acronym">IERO</journal-id>
<journal-title-group>
<journal-title>Expert</journal-title>
</journal-title-group>
<issn publication-format="print">159</issn>
</journal-meta>

Thanks
Byomokesh
--~----------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
EasyUnsubscribe: http://lists.mulberrytech.com/unsub/xsl-list/3329386
or by email: [email protected]
--~--

--00000000000029019e05bffb57ad
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>Any way to same indentation=C2=A0wi=
ll appear while converting One XML to Another XML format. I am using indent=
=3D&quot;yes&quot; but the same indent does not appear in converted output =
xml.</div><div><br></div><div>I can not use xsl:copy because I have to appl=
y one format to another format with different scenarios.=C2=A0=C2=A0<br></d=
iv><div><br></div><div><u>XSL:</u></div><div><br></div><div>&lt;xsl:output =
indent=3D&quot;yes&quot; method=3D&quot;xml&quot; /&gt;<br></div><div><br><=
/div><div><u>INPUT:</u></div><div>&lt;journal-meta&gt;<br>&lt;journal-id jo=
urnal-id-type=3D&quot;publisher-id&quot;&gt;ier&lt;/journal-id&gt;<br>&lt;j=
ournal-id journal-id-type=3D&quot;publisher-acronym&quot;&gt;IERO&lt;/journ=
al-id&gt;<br>&lt;journal-title-group&gt;<br>&lt;journal-title&gt;Expert&lt;=
/journal-title&gt;<br>&lt;/journal-title-group&gt;<br>&lt;issn publication-=
format=3D&quot;print&quot;&gt;159&lt;/issn&gt;<br>&lt;/journal-meta&gt;<br>=
</div><div><br></div><div><u>OUTPUT:</u></div><div>=C2=A0 =C2=A0 =C2=A0 &lt=
;journal-meta&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;journal-id journ=
al-id-type=3D&quot;CAT&quot;&gt;IERO&lt;/journal-id&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0&lt;journal-id journal-id-type=3D&quot;publisher&quot;&=
gt;IERO&lt;/journal-id&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;journal=
-title-group&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &lt;journal-t=
itle&gt;Expert&lt;/journal-title&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&=
lt;/journal-title-group&gt;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&lt;issn p=
ublication-format=3D&quot;print&quot;&gt;159&lt;/issn&gt;<br>=C2=A0 =C2=A0 =
=C2=A0 &lt;/journal-meta&gt;<br></div><div><br></div><div>EXPECTED OUTPUT:<=
/div><div><br></div><div>&lt;journal-meta&gt;<br></div><div>&lt;journal-id =
journal-id-type=3D&quot;publisher-id&quot;&gt;ier&lt;/journal-id&gt;<br>&lt=
;journal-id journal-id-type=3D&quot;publisher-acronym&quot;&gt;IERO&lt;/jou=
rnal-id&gt;<br>&lt;journal-title-group&gt;<br>&lt;journal-title&gt;Expert&l=
t;/journal-title&gt;<br>&lt;/journal-title-group&gt;<br>&lt;issn publicatio=
n-format=3D&quot;print&quot;&gt;159&lt;/issn&gt;<br>&lt;/journal-meta&gt;<b=
r></div><div></div><div><br></div><div>Thanks</div><div>Byomokesh</div><div=
><br></div></div>
<div><!-- begin bl.html.trailer -->
<div style=3D"border-top:1px solid black; background-color: #dddddd;
color: #888888; font-size: smaller; padding: 5px; text-align: center;
font-family: arial,verdana,arial,sans-serif; margin-top:1em; clear:
both; margin: auto">
<a href=3D"http://www.mulberrytech.com/xsl/xsl-list">
XSL-List info and archive</a>
<div style=3D"text-align:center;">
<a style=3D"color: blue;"
  href=3D"http://lists.mulberrytech.com/unsub/xsl-list/3329386"
>EasyUnsubscribe</a>
(<a style=3D"color: blue;"
href=3D"mailto:[email protected]?subject=3Dremove"
>by email</a>)
</div>
</div>
<!-- end bl.html.trailer --></div>

--00000000000029019e05bffb57ad--