shale-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net (Gary VanMatre)
Subject Clay Symbols aren't namespace aware - would be nice to have, wouldnt it?
Date Mon, 09 Apr 2007 00:53:13 GMT
>Using a full HTML clay view it is possible to do things like that in a
>clay view:
>
><html xmlns="http://www.w3.org/1999/xhtml"
>xmlns:f="http://java.sun.com/jsf/core"
>xmlns:h="http://java.sun.com/jsf/html"
>xmlns:clay="http://shale.apache.org/clay"
>xmlns:s="http://shale.apache.org/core"
>xmlns:t="http://myfaces.apache.org/tomahawk">
>
> <t:table ...>
></t:table>
>
></html>
>
>I can use the components without using spans and the jsfid parameter.
>
>But if i use symbols to craft my page this does not work.
>
>The template does got the xmlns namespaces in the root html tag, but the
>symbols which gets replaced with header, footer & co like this:
>
><div xmlns="http://www.w3.org/1999/xhtml"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:clay="http://shale.apache.org/clay"
> xmlns:s="http://shale.apache.org/core"
> xmlns:t="http://myfaces.apache.org/tomahawk" jsfid="void">
>
><p>
> This is the Header.
></p>
></div>
>
>need this surrounding "div" workaround, to get the <t:table> working for
>example.
>Without the div and the namespaces, its "broken"and gets not replaced by
>the jsf component.
>

You could add the namespace to the table component too.  You can also add an extends attribute.

<t:table xmlns:t="http://myfaces.apache.org/tomahawk" extends="mytable"

>Should this work, is this a bug? Or is this correct behaviour?
>


I tried to model it like an XML namespace but the clay markup template parser is not validating
so you have a mix of html with namespaces. 


>It would be nice if the symbols which gets replaced can use the
>namespaces declared in the "root" template.
>

Yeah, that's not a bad idea.  We would still need the namespace to be declared in the template
file.  Clay treats each template as a root.  Once the markup is parsed, it can be included
in any number of templates without re-parsing.  It works more like a dynamic include versus
a static include.

Are you thinking about something like this?

<div xmlns:t="@tomahawkns" ...   

>kind regards
>
>Torsten
>

Gary

>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message