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

Generating ODF

Subject: Generating ODF
From: Michael B Allen <mba2000@xxxxxxxxxx>
Date: Tue, 13 Mar 2007 23:00:19 -0400
 Generating ODF
Does anyone have experience emitting ODF?

I have the basics working but now I'm into tables and things that are
clearly not elegantly handled due to excentricities in ODF's schema.

For example, my master doc uses a 'pre' tag to format code fragments
and such like:

<pre>
// find accounts with a logonCount of 0
$params = array(
    'base' => 'CN=Users,DC=example,DC=com',
    'scope' => 'sub',
    'filter' => '(&amp;(objectClass=user)(logonCount=0))'
);
$objs = foo_search_objects($px, $params);
</pre>

The target ODF output is:

<text:p text:style-name="Code_20_Sample">// find accounts with a logonCount of 0</text:p>
<text:p text:style-name="Code_20_Sample">$params = array(</text:p>
<text:p text:style-name="Code_20_Sample"><text:s text:c="4"/>'base' =&gt; 'CN=Users,DC=example,DC=com',</text:p>
<text:p text:style-name="Code_20_Sample"><text:s text:c="4"/>'scope' =&gt; 'sub',</text:p>
<text:p text:style-name="Code_20_Sample"><text:s text:c="4"/>'filter' =&gt; '(&amp;(objectClass=user)(logonCount=0))'</text:p>
<text:p text:style-name="Code_20_Sample">);</text:p>
<text:p text:style-name="Code_20_Sample">$objs = foo_search_objects($px, $params);</text:p>

There several hurdles in generating this.

1. Every line is text:p tagged separately

2. Indenting is represented using text:s tags.

I've done this sort of thing enough before that I'm optimistic that I
can make it work but I was hoping someone else has already done this
sort of thing and had some template fragments they could share?

Mike

-- 
Michael B Allen
PHP Active Directory SSO
http://www.ioplex.com/

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.