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

[xsl] Re: different styles on element


Subject: [xsl] Re: different styles on element
From: Nathan Shaw <n8_shaw@xxxxxxxxx>
Date: Mon, 4 Aug 2003 06:51:36 -0700 (PDT)

Hi Abhishek,

I think you are on the right track with using modes.
You should not have to add anything to your xml
document in order to use modes, as long as you can
create a set of rules for the modes to follow, that
is...

If you want to apply different stylings to the same
element somewhat randomly (no pattern), I think you
will have to add the formatting to the xml document.
However, if you can establish some rules, you could
use modes and/or template matching based on position
to accomplish what you are trying to do.

--Nate


-----------------------------------------------------
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

=====
------------------------------------------------------------
Nathan Shaw
Web Applications Developer & Real Estate Investor
http://www.iaffectProperties.com
------------------------------------------------------------

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Current Thread
Keywords