Click to See Complete Forum and Search --> : How to add css file link to XML file?


toplisek
05-24-2007, 05:47 AM
I have xml file and would like to add css style link to this file. How to do correctly? File name is in directory css and name with stylesheet.css.

Need help.

Charles
05-24-2007, 06:16 AM
Just like with XSL.

http://www.w3schools.com/xml/xml_display.asp

toplisek
05-24-2007, 06:39 AM
I have done like:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="http://www.kl-brazda.si/css/stylesheet.css"?>

and put <title class="heading4">IMG_1549.jpg</title>

why is possible without result?

Charles
05-24-2007, 08:09 AM
why is possible without result?Hard to say without the URL.

Charles
05-24-2007, 08:31 AM
I've checked the links that you provided by private message—and forgive me, I don't like to respond to private messages—and it looks like you've just linked to the stylesheet for the HTML. You need a special one for the XML.

Or you can do what I do, link to an XSL stylesheet that transforms the XML into HTML that matches the rest of your site. And a part of that virtual HTML is a link to the CSS for the rest of the site.

toplisek
05-24-2007, 08:39 AM
As I'm new to this. Can you send me how to do link to an XSL stylesheet that transforms the XML into HTML that matches the rest of your site.
thank you

Charles
05-24-2007, 08:41 AM
See http://www.w3schools.com/xml/xml_xsl.asp .

Mr Initial Man
06-06-2007, 12:22 PM
One of the things you have to do with CSS if you want to use it directly with XML is describe PRECISELY what you want the element to do/look like. Do you want it block or inline? Do you want it to be bigger than normal? What's the base font? I don't know how to use XML+CSS to make the file name show up in the title bar, though.