Hi Peter,

first of all, if you have a namesake .css file in the same folder as the UISPIN 
file then the system will automatically use it as a stylesheet. But in your 
case the names don't match so you need another solution.

Create a folder such as imports.www (note it needs to end with ".www") and copy 
the CSSs (or JavaScript files etc) into it. You can now reference any file in 
there using relative URLs like "lib/imports/boxology.css".  The "lib" servlet 
is part of TBL and will work with any folder ending with .www in your workspace.

Holger





On Feb 9, 2011, at 4:21 AM, peter wrote:

> I should be able to work this out, but I'm going round in circles.
> I have a trivial project now:
> css-test.n3 imports uispin.org/tui & ui.
> I have only two classes defined:
> 
> 1) css-test:InjectCSS, subclass of ui:Element, with ui:headIncludes
> <ui:createLink ui:resource="boxology.css">
>    <link href="{= ?link }" rel="stylesheet" type="text/css"/>
> </ui:createLink>
> 
> 2) css-test:Box, subclass of owl:Thing, with ui:InstanceView
> <ui:group>
>    <css-test:InjectCSS/>
>    <div class="element">{= ui:label(?this) }</div>
> </ui:group>
> 
> There is a "boxology.css" file in the project workspace.
> 
> I create an instance of Box, and open in UIPSIN browser, then view in
> external browser. Resulting HTML is
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml";>
>    <head>
>        <META http-equiv="Content-Type" content="text/html;
> charset=utf-8">
>        <link href="uispin?_resource=boxology.css" rel="stylesheet"
> type="text/css">
>    </head>
>    <body>
>        <css-test:InjectCSS xmlns:css-test="http://localhost:8083/css-
> test"></css-test:InjectCSS>
>        <div class="element">css-test:myBox</div>
>    </body>
> </html>
> 
> I know I should not be using ui:createLink, but please can you say how
> I should make the link to the css file so that it will work in the
> external browser?
> 
> I am using TBC-ME 3.4.0 on Windows 7 64 bit, BTW.
> 
> Yours in expectation of a happy outcome
> 
> Peter
> 
> -- 
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to