xsl-list
[Top] [All Lists]

[xsl] ODT transform, automatic styles problem

2009-02-13 10:11:51
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[(_at_)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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] ODT transform, automatic styles problem, lac <=