Welcome to WebmasterWorld Guest from 54.242.173.65

Forum Moderators: httpwebwitch

Message Too Old, No Replies

Learning XML XSLT

     
2:45 am on Jun 25, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 30, 2005
posts:192
votes: 0


Hi

I have been looking for a beginners guide on how to format my XML file - without success. I'm very familiar with CSS, however I don't quite get XSLT and this FO business.

How, for example would I format this HTML into XSLT and FO?


<div id="asd" class="rounded small left">
<img src="images/tl.gif" class="tl" />
<img src="images/tr.gif" class="tr" />
<h2>asd</h2>
<div class="intro">
<p>asd</p>
<a href="/asd/">Learn more...</a> </div>
<img src="images/bl.gif" class="bl" />
<img src="images/br.gif" class="br" />
</div>

They link to my CSS file. I'm assuming it would be sorta like:


<site>
<page>
<top><img src="images/tl.gif" class="tl" /><img src="images/tr.gif" class="tr" /></top>
<title><![CDATA[ <h2>asd</h2> ]]></title>
<intro><![CDATA[ <p>asd</p><br /><a href="/asd/">Learn more...</a> ]]>
</intro>
<bottom>
<img src="images/bl.gif" class="bl" /><img src="images/br.gif" class="br" />
</bottom>
</page>
</site>

.rounded looks like this:


.rounded
{
border: 1px solid #000;
position: relative;
padding: 9px;
margin: 9px 9px 0 0;
background: #fff;
}
2:58 am on June 25, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 21, 2005
posts:1526
votes: 0


Hi music_man,

Not quite sure what you want as a result. I'm a bit dense.

FO is a different beast from XSLT. FO processors are very useful, but pretty pricey as well.

XSLT, on the other hand, is something that can be enabled in most modern hosting environments using OSS tech.

If you are curious about what I went through as I learned it, I kept a running diary here:

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

[webmasterworld.com...]

7:12 am on June 25, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 30, 2005
posts: 192
votes: 0


Thanks for the links!

I suppose what I am asking is:

How can I make similar CSS formatting rules in XSLT?

7:54 am on June 25, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts: 2155
votes: 7


music_man,

CSS is pretty much the same. The problem comes in when you are assigning classes is XSLT. Can you possibly post some of your XSLT along with the desired CSS?

Marshall

10:42 am on June 28, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 30, 2006
posts:399
votes: 0


XSLT is far more powerful than CSS , check out xslt for dummies to get a fair idea
10:54 am on June 28, 2007 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 4, 2001
posts:2155
votes: 7


I was referring to using CSS in tandem with XSLT.

Marshall

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members