#11 Remote CSS in Roma Generated Documentation

closed
5
2007-02-09
2006-12-01
James Cummings
No

Already mentioned this, but we should find a solution to importing the CSS file referenced as an external link by the HTML documentation generated by Roma. It should be all present in one file and not need access to the internet to display nicely.

I understand the desire not to hard code it in the CSS.

I'll try to think of an XSLT solution to read in Non-XML data. In XSLT2 there is an unparsed-text() function to do exactly this. I don't know whether EXSLT or similar might have an extension to do this in XSLT1.

I'll try to find out, I file this bug as a reminder to myself mostly.

-James

Discussion

  • James Cummings
    James Cummings
    2006-12-11

    Logged In: YES
    user_id=612078
    Originator: YES

    Right.

    Thinking about this:

    What about using XInclude? So the XML generated has an <xi:include parse="text" href="http://www.tei-c.org/tei.css"/> or whatever and then when the XML is used to generate HTML, this step also include an xinclude processing.

    -James

     
  • James Cummings
    James Cummings
    2006-12-11

    • assigned_to: nobody --> rahtz
     
  • Logged In: YES
    user_id=95949
    Originator: NO

    Sorry, I am going to have to nix this one. There is not a place
    in the processing where the XInclude would run. The ODD
    is transformed to HTML in one step.

     
    • status: open --> closed
     
  • James Cummings
    James Cummings
    2007-02-09

    Logged In: YES
    user_id=612078
    Originator: YES

    And it is transformed to HTML by something that can't handle XIncludes? Pity. Well, ok. That was one idea for a solution. I still think it is a problem that should be solved even if my suggested solution doesn't work.

    But I don't have another one to hand. How is the ODD transformed to HTML. (XSL 1.0 stylesheet I'm assuming.)

    I'm assuming that using an entity reference wouldn't work here? Other possible suggestions would involve trying to pass the CSS as a string parameter (too large maybe?), or writing an extension function for the processor (icky).

    There is another possibility of course. Since the website (currently at least) is running cocoon, we could have a URI that the XSLT includes which results in an XML version of the CSS. http://www.tei-c.org/tei.css.xml or something. You have cocoon match this url and wrap the existing css in a single root element.

    So the file is:

    body {font-size:300%;}
    ...

    and the XML version is:

    <style type="text/css">
    body {font-size:300%}
    ...
    </style>

    I think the way to do that in cocoon is aggregation, I think.