Hi everyone,
Just a quick question. I have one XML and I was hoping to tranform only a section of it without changing anything else. Here is a quick example of what I am looking to do:
Input:
<?xml version="1.0" encoding="UTF-8"?>
<dita xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/ditabase.xsd">
<topic id="abc">
<title>Sample XML</title>
<body>
<section id="a">
<p> Hello section A </p>
</section>
<section id="b">
<p> General Content </p>
</section>
<section id="c">
<p> Hi thank you for coming from $state </p>
</section>
</body>
</topic>
</dita>
Output
<?xml version="1.0" encoding="UTF-8"?>
<dita xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../xsd/ditabase.xsd">
<topic id="abc">
<title>Sample XML</title>
<body>
<section id="a">
<p> Hello section A </p>
</section>
<section id="b">
<p> General Content </p>
</section>
<section id="c" audience = "WA">
<p> Hi thank you for coming from WA </p>
</section>
<section id="c" audience = NY">
<p> Hi thank you for coming from NY </p>
</section>
<section id="c" audience = "AL">
<p> Hi thank you for coming from AL </p>
</section>
<section id="c" audience = "GA">
<p> Hi thank you for coming from GA </p>
</section>
...
<!--Continue for the rest of the states-->
...
</body>
</topic>
</dita>
I am using the XALAN processor if that could help. Thanks a lot in advance :D