[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] apply diff styles/formatting to an xml element in diff parts of XMLDoc : HOWTO


Subject: [xsl] apply diff styles/formatting to an xml element in diff parts of XMLDoc : HOWTO
From: "SANWAL, ABHISHEK (HP-Houston)" <abhishek.sanwal@xxxxxx>
Date: Sun, 3 Aug 2003 23:32:20 -0500

How is it possible to apply different styles/formatting to an xml 
element in different parts of the XML document for a resulting FO 
document.

For e.g. I have an element i.e. say - <SectionHeading>

Now of course the XSL Template that matches this element will apply 
to the element.

How would it be possible to define different FO 
style/block/layout/spacing to the XML elements of the same name in 
different parts of the FO document that is to be created. (Eventually 
to PDF).

I know that one way would be to change the XML element tag names to 
something else and apply templates based on that.

But we want to MAINTAIN the documents "content" model. But want to be 
able to apply varied types of styling by editing the XSLs. 

One way I was thinking was to apply "modes" but that would mean that 
I would have to add "modes" to the XML document.

Another one I was thinking was some kind of COUNT (like in a 
programming language) where elements whose counts are within 
different ranges are worked on by different formatting/layout blocks. 
Of course my stylesheets would get really complicated. 

Can someone suggest some ideas for this WITHOUT any changes to the 
XML data and element model.

Please do let me know or point me to a tutorial/reference to do this 
without complicating my stylesheet and life a lot.

Thanks in advance.

Abhishek Sanwal

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



Current Thread
Keywords