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

(Inlined CSS properties) - A dynamic quantity of variables?

Subject: (Inlined CSS properties) - A dynamic quantity of variables?
From: Svante Schubert <sus@xxxxxxxxxxxxxxx>
Date: Wed, 14 Jun 2000 13:38:14 GMT
fo font style
Hello everybody,


during a XML to HTML transformation I need to collect style 
properties, which are cumulated from a style-hierachy. 
(example below)

This can be done quite easily by taking the style properties of the 
corresponding style and add new parent style properties by going 
higher in the hierachy.

The problem comes with the storage and access of the property values.
As it is obvious that certain styles occur quite often in the body the
styles should be (for performance reasons) created once in the 
beginning and later recalled.
A global variable would be nice but there are the common problems with
the result tree fragment (RTF) for the later access. Also the number 
of styles varies.

The access to certain styles is my problem, the propertylist itself 
could be an RTF.

My wish would be a global variable with an allStyle element having 
all the styles as attributes with the styleproperties as their value.


Has anybody an idea or suggestion?


Post Scriptum: 

Although I am using the James Clark parser, I do not want to use 
the extension function, which convert RTF to node set, as I like to 
use XSLT compiler in the near future. These compilers will probably 
only rely on the standard. You see the performance is one of the 
most significant goals.



Here the problem example:

INPUT-XML:
~~~~~~~~~~

<office:document>   
    <office:styles>
        <style:style style:name="Standard">
            <style:properties   fo:font-size="12pt" 
                                fo:font-weight="normal" 
                                fo:font-style="normal"/>
        </style:style>
    
        <style:style style:name="StandardParagraph" 
                     style:parent="Standard">
            <style:properties   fo:font-size="14pt" 
                                fo:font-weight="bold"/>
        </style:style>

        <style:style style:name="MyParagraph" 
                     style:parent="StandardParagraph">
            <style:properties   fo:font-size="16pt" 
                                fo:font-style="italic"/>
        /style:style>
    </office:styles>
    <office:body>        
        <text:p text:style-name="Standard">
            I want to be normal 12  
        </text:p>
        
        <text:p text:style-name="StandardParagraph">
            I want to be bold 14    
        </text:p>
        
        <text:p text:style-name="MyParagraph">  
            I want to be bold italic 16 
        </text:p>       
    </office:body>
</office:document>


OUTPUT-XML:
~~~~~~~~~~~

<html>
    <head>
        <title>TEST</title>
    </head>
    <body>
        <p style="  font-size:   '12pt'; 
                    font-weight: 'normal'; 
                    font-style:  'normal'">  
                    
            I want to be normal 12 
         </p>
         
        <p style="  font-size:   '14pt'; 
                    font-weight: 'bold';   
                    font-style:  'normal'">  
                    
            I want to be bold 14 
        </p>
        <p style="  font-size:   '16pt'; 
                    font-weight: 'bold';   
                    font-style:  'italic'">
                    
            I want to be bold italic 16
        </p>   

    </body>
</html>



best regards

Svante


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.