|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
applying css and xslt to an xml document
I have a css stylesheet and an xslt stylesheet.
In my xml doc i apply the xslt stylesheet, but how do i also apply the css? thanks
__________________
That's my $0.02 |
|
#2
|
||||
|
||||
|
<?xml-stylesheet href="mystyle.css" type="text/css"?>
cheers, gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing. My html and css workshop, demos and tutorials. Ask a better question, get a better answer. |
|
#3
|
||||
|
||||
|
I thought that xslt is to xml, as css is to html? Any suggestions on where one could learn more about xslt?
__________________
The Standards! CSS 2 - CSS 3 - w3c CSS Validator - XHTML 1.1 - HTML 4.01 - w3c (X)HTML Validator - ActionScript Reference Links! Bert's Door and Lock Service | Brandon Erik Bertelsen | TextPattern |
|
#4
|
||||
|
||||
|
no,
with css you can define the look and layout, but with xslt you can transform the document, you can prossess the data in the xml-document. http://www.w3.org/Style/XSL/WhatIsXSL.html so basicly you should use css when you can, and xslt when you must, as xslt can be more "heavy" to run. |
|
#5
|
||||
|
||||
|
the problem is that my prof gave me **** for using tags like <i></i> and <b></b> and the <font> tag in my xslt document. he said i should use css, but i don't know how to apply the css stylesheet along with the xslt. i tried putting in a <link>, but it didn't work, maybe i put in the wrong thing, can you please check it:
PHP Code:
|
|
#6
|
||||
|
||||
|
OK, once more. This is from W3Schools;
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/css" href="cd_catalog.css"?>
<CATALOG>
<CD>
<TITLE>Empire Burlesque</TITLE>
<ARTIST>Bob Dylan</ARTIST> …
cheers, gary |
|
#7
|
||||
|
||||
|
kk5st, you don't get it.
i know how to attach a css stylesheet to an xml document, i have to attach BOTH a css and an xslt stylesheet to the document. i tried doing it by putting a <link> tag inside the xslt but it doesn't work, i'm only asking for you to check if my syntax is correct, not to do it for me. |
|
#8
|
||||
|
||||
|
i see nothing wrong with the syntax,
it should work without a problem. did also tested yours example, the css loaded without a problem |
![]() |
| Viewing: Dev Shed Forums > Web Design > CSS Help > applying css and xslt to an xml document |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|