Topic: XSL Stylesheet seems to be inline format... (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11029" title="Pages that link to Topic: XSL Stylesheet seems to be inline format... (Page 1 of 1)" rel="nofollow" >Topic: XSL Stylesheet seems to be inline format... <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 08-21-2003 00:15

Hi, guys. How are you?
Well, I have been trying to understand the concept about XSLT.
It is a language for transforming XML document.
XML is not predefined so that browser doesn't understand how to display nicely.
Just like HTML and CSS. So I have to make up XSL template to show content. In that template, I can put style(actually CSS?!) into each tag of template.
After that put path in XML file to connect XSL file and XML file.
In this way, I can see well-formatted XML using browser.

What I was wondering was:
When I make XSL template, I wanted to take CSS styles into external stylesheet. Cuz I felt like doing inline format. When I format HTML file, I avoid inline format. I was pretty confused about that.

But actually XSLT is the stylesheet which looks after stylesheet as well as structure(template).

Hhmm.....Difficult to explain.....
I need to study more English though.
Anyway, do you know what I mean????
If so, what do you think?

Hiroki Kozai

Moon Shadow
Paranoid (IV) Inmate

From: Rouen, France
Insane since: Jan 2003

posted posted 08-21-2003 13:07

If I understood well your question (which I'm not sure, I too have problems with English ), you want to include CSS styles in your XSL files ?

You can.

An example from this page, I added the bolded part :

code:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html>
[b]<head>
<link href="css.css" rel="stylesheet" type="text/css" />
</head>[/b]
<body>
<h2>My CD Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th align="left">Title</th>
<th align="left">Artist</th>
</tr>
<xsl:for-each select="catalog/cd">
<tr>
<td [b]class="title"[/b]><xsl:value-of select="title"/></td>
<td><xsl:value-of select="artist"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>

</xsl:stylesheet>




The bolded parts will result in applying the class "title" defined in css.css.




[This message has been edited by Moon Shadow (edited 08-21-2003).]

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 08-22-2003 06:32

First of all, thanks for your reply.
I regretted about submitting that post.
Well, feel like wondering around in the dark.
Cannot see anything.....
@_@ Hmm......



Hiroki Kozai



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu