Changes between Version 28 and Version 29 of XsltMacro


Ignore:
Timestamp:
Sep 22, 2016, 10:52:17 PM (7 years ago)
Author:
figaro
Comment:

Moved example to functional description

Legend:

Unmodified
Added
Removed
Modified
  • XsltMacro

    v28 v29  
    77The XsltMacro allows you to embed the result of an XSL-transformation in a page. It takes two parameters, a stylesheet and a document to transform. These can be an attachment on any wiki-page or ticket, any page from the htdocs area, any file in the repository, or any url (these options are similar to those for Trac's native [http://projects.edgewall.com/trac/wiki/WikiMacros#AvailableMacros ImageMacro]).
    88For more details see the documentation in the macro.
     9
     10The following table is produced with this macro call:
     11{{{
     12[[Xslt(format.xsl, info.xml)]]
     13}}}
     14
     15{{{#!html
     16<table border="1">
     17<tr>
     18<th>Name</th>
     19<th>Address</th>
     20<th>Email</th>
     21</tr>
     22  <tr>
     23<td>John Smith</td>
     24<td>42 Easy St</td>
     25<td>johns@cool.com</td>
     26</tr>
     27  <tr>
     28<td>Mary Francis</td>
     29<td>1 Heavenly Way</td>
     30<td>maryf@hot.com</td>
     31</tr>
     32</table>
     33}}}
     34
     35Here's how you would tell it to use an iframe:
     36{{{
     37[[Xslt(format.xsl, info.xml, use_iframe, if_height=500)]]
     38}}}
     39
     40For the full docs see the WikiMacros page after installing this macro.
    941
    1042The macro can either be installed as a simple macro or as a plugin; the ''use_iframe'' and ''use_object'' options (see below) only work when installed as a plugin.
     
    4173
    4274You can check out XsltMacro from [/svn/xsltmacro here] using Subversion, or [source:xsltmacro browse the source] with Trac.
    43 
    44 == Example
    45 
    46 The following table is produced with this macro call:
    47 {{{
    48 [[Xslt(format.xsl, info.xml)]]
    49 }}}
    50 
    51 {{{#!html
    52 <table border="1">
    53 <tr>
    54 <th>Name</th>
    55 <th>Address</th>
    56 <th>Email</th>
    57 </tr>
    58   <tr>
    59 <td>John Smith</td>
    60 <td>42 Easy St</td>
    61 <td>johns@cool.com</td>
    62 </tr>
    63   <tr>
    64 <td>Mary Francis</td>
    65 <td>1 Heavenly Way</td>
    66 <td>maryf@hot.com</td>
    67 </tr>
    68 </table>
    69 }}}
    70 
    71 Here's how you would tell it to use an iframe:
    72 {{{
    73 [[Xslt(format.xsl, info.xml, use_iframe, if_height=500)]]
    74 }}}
    75 
    76 For the full docs see the WikiMacros page after installing this macro.
    7775
    7876== Recent Changes