[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

ODT transform, automatic styles problem

Subject: ODT transform, automatic styles problem
From: lac <e107lac@xxxxxxxxx>
Date: Fri, 13 Feb 2009 16:11:22 +0100
 ODT transform
Hi List!

I need a little help for ODT transform with XSLT 1.0.I have problem
with automatic generated styles. I dont matching elements by
style:parent-style-name

For example:

part of XML (here is the full source http://lac.wsb.hu/content.xml)

<office:document-content
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
.....
.....
 <office:automatic-styles>
      <style:style style:name="P2" style:family="paragraph"
style:parent-style-name="Body">
     ......
    ......
     </style:style>

</office:automatic-styles>

<office:body>
        <office:text text:use-soft-page-breaks="true">
....
...
...
     <text:section text:style-name="Sect1" text:name="Section">


    <text:p text:style-name="Body">
        Lorem ipsum do.......
    </text:p>

    <text:p text:style-name="P2">
        Lorem ipsum do.......
    </text:p>
</text:section>
</office:body>
</office:document-content>


XSL

<xsl:template match="text:p[@text:style-name = 'Body']| XPATH for
getting current text:p which style name = //style:style/@style-name
and @style:parent-style-name = Body ">
   <xsl:element name="p">
     <xsl:value-of select='.'/>
   </xsl:element>
</xsl:template>


I hope you understand my problem.



Thank you, and sorry for my English


Lac

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.