Include CSS and Schema informatione in XML files

P

Piet

Hi there.
I have started to work with CSS. For formatting HTML files, the CSS
commands can either be be present in the same HTML file via the
style-tag
<style type="text/css">
<!--
tagname {}
-->
</style>
or be present in a separate CSS file and be included via
<link rel="stylesheet" type="text/css" href="stylesheet.css">
For defining the output of xml files (which is want I want to do
preferentially) only the second method (referencing to external CSS
file) seems to exist:
<?xml-stylesheet type="text/css" href="stylesheet.css" ?>
Is it possible to include CSS formating informations directly into the
xml file as it is possible with DTD´s ?
I haven´t found any hint on doing this so far.
Please help! Thanx in advance.
Piet
 
G

GIMME

The thing with IE5.51 (And I think IE6) is that link and script tags
which include external files must have both a begin and an end tag.

For example :

This doesn't include the css :

<link rel="stylesheet" type="text/css" href="stylesheet.css">

While this does :

<link rel="stylesheet" type="text/css" href="stylesheet.css"></link>

This makes things problematic for developers.

If a developer tells his XSL transformer to create both begin
and end tags in the output, then :

<br/>

In the xslt becomes :

<br></br>

in the XHTML.

That's not a good thing because in IE <br></br> doesn't render
the same as either <br> or <br/>. (<br></br> renders with an
extra break which makes the resulting XHTML visually unappealing.)

So, personally, I've set up a scheme in my JSPs to write the
javascript and link external stuff separately and to have the
transform create everything in the body tags.

PS, IE doesn't support textareas in "XHTML", so you occassionally
you have use workarounds when you use them. The IE spec actually
says that using end tags for textares isn't suppported. And IE
does not claim to fully support XHTML.

If you search on google on this group you can find an example
using a textarea which fails (the text that should go into
the textarea appears outside the textarea).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top