Include CSS and Schema informatione in XML files

Discussion in 'XML' started by Piet, Sep 14, 2003.

  1. Piet

    Piet Guest

    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
    Piet, Sep 14, 2003
    #1
    1. Advertising

  2. Piet

    GIMME Guest

    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).
    GIMME, Sep 19, 2003
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page