Convert XML file to another XML file using XSLT
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 1
- Joined: Wed Oct 28, 2009 2:49 pm
Convert XML file to another XML file using XSLT
Post by sushil.sharma75 »
I need to convert the following XML file
<Para>
<PgfTag value="Body" type="str"/>
<Pgf>
<PgfFont>
<FFamily value="Times New Roman" type="str"/>
<FWeight value="Regular" type="str"/>
</PgfFont>
</Pgf>
<ParaLine>
<String>Underlined charcter</String>
</ParaLine>
</Para>
<Para>
<PgfTag value="Body" type="str"/>
<Pgf>
<PgfFont>
<FFamily value="Times New Roman" type="str"/>
<FWeight value="Regular" type="str"/>
<FAngle value="Italic" type="str"/>
</PgfFont>
</Pgf>
<ParaLine>
<String>Italic charcter</String>
</ParaLine>
</Para>
to
<styles>
<style family="paragraph" name="P1">
<paragraph-properties line-height-at-least="0.1945in" text- autospace="none" />
<text-properties text-underline-style="solid" text-underline-width="auto"/>
</style>
<style family="paragraph" name="P2">
<paragraph-properties line-height-at-least="0.1945in" text-autospace="none">
</paragraph-properties>
<text-properties font-style="italic">
</text-properties>
</style>
</styles>
<body>
<texts>
<text style-name="P1">
Underlined charcter
</text>
<text style-name="P2">
Italic charcter
</text>
</texts>
</body>
I am able to get the styles tags but how Can I get the Texts tags with style-names as P1 and P2
Thank you in advance
<Para>
<PgfTag value="Body" type="str"/>
<Pgf>
<PgfFont>
<FFamily value="Times New Roman" type="str"/>
<FWeight value="Regular" type="str"/>
</PgfFont>
</Pgf>
<ParaLine>
<String>Underlined charcter</String>
</ParaLine>
</Para>
<Para>
<PgfTag value="Body" type="str"/>
<Pgf>
<PgfFont>
<FFamily value="Times New Roman" type="str"/>
<FWeight value="Regular" type="str"/>
<FAngle value="Italic" type="str"/>
</PgfFont>
</Pgf>
<ParaLine>
<String>Italic charcter</String>
</ParaLine>
</Para>
to
<styles>
<style family="paragraph" name="P1">
<paragraph-properties line-height-at-least="0.1945in" text- autospace="none" />
<text-properties text-underline-style="solid" text-underline-width="auto"/>
</style>
<style family="paragraph" name="P2">
<paragraph-properties line-height-at-least="0.1945in" text-autospace="none">
</paragraph-properties>
<text-properties font-style="italic">
</text-properties>
</style>
</styles>
<body>
<texts>
<text style-name="P1">
Underlined charcter
</text>
<text style-name="P2">
Italic charcter
</text>
</texts>
</body>
I am able to get the styles tags but how Can I get the Texts tags with style-names as P1 and P2
Thank you in advance
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Convert XML file to another XML file using XSLT
Post by sorin_ristache »
Hello,
Maybe you can start from the XSLT identity transform and modify it until you get the transformation to your result document. I think you can find many XSLT experts on the xsl-list mailing list.
Regards,
Sorin
Maybe you can start from the XSLT identity transform and modify it until you get the transformation to your result document. I think you can find many XSLT experts on the xsl-list mailing list.
Regards,
Sorin
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service