I am trying to work out a good simple way to do fonts. I have a pipeling
that creates idealized UI components and then applies a look and feel for
the naked components. One of my components is a 'pane'
<ui:pane fontid="xxx" id="pane1">
<ui:pane id="pane2">
<para>sdsdf</para>
</ui:pane>
<ui:pane fontid="www" id="pane3">
<ui:form>
<ui:input fontid="yyy" name="username" type="text"/>
<ui:input name="password" type="hidden"/>
<ui:input name="login" type="submit"/>
</ui:form>
</ui:pane>
</ui:pane>
In this example pane1 would enclose pane2 and pane3. At the HTML generation
stage it might use frames or tables to layout the page. I want to be able to
put default fonts on the pane, and if it is not present at html generation
time, I want it to use the font of the parent. But this means, near as I can
tell with HTML, that I have to put the font around every ui component inside
the pane. Essentially reproducing Cascading Style sheets.
The solution I have come up with applies a stylesheet to the html at the end
of the pipeline and wraps all tags that have a fontid attribute in a font
tag. This feels a little wrong to me, but I can not figure out an
alternative.
A second question. What kind of XSL trick should I employ to pass the
fontids down to child panes (or other components). The idea is that the if a
pan or other ui component doesn't have a fontid it should use the fontid of
the parent. The same idea would be applied to background and foreground
colors.
Am I off on the wrong track completely here? Our application must write to a
number of output devices and we do not trust CSS. besides isn't XSL suppose
to be a replacement? I like the purity of an al XML based solution.
Might formatting objects be the solution? If so are there stylesheets for
writing to WAP and CHTML?
Thanks
Mark Miller
Web Architect
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>