> > From: Ian.Priest [mailto:[EMAIL PROTECTED] 
> > Sent: 03 May 2007 12:15 
> > To: user@shale.apache.org 
> > Subject: Clay full-xml and namespace ignoring my tags 
> > 
> > Hi, 
> > 
> > 
> > 
> > I'm going round the bend with this one and suspect I'm missing 
> > something 
> > really obvious. I have a site set up that uses full xml views. I'm 
> > trying to add namespace tags to my pages, but they don't get rendered 
> > unless I use jsfid - here's what I mean... 
> > 
> > 
> > 
> > Page example.html: 
> > 
> > 

<snippet/>
> > 
> > So Clay is happily replacing my tag but isn't 
> > processing my h:outputText tag. Anyone know why not? 
> > 
> > 
> > 
> > Cheers, 
> > 
> > Ian. 
> > 
> > 
> 
> I'm a step closer - it's something to do with the namespace 
> declarations. If I do this... 
>    <span jsfid="h:outputText" value="hello" />
>       <h:outputText xmlns:h="http://java.sun.com/jsf/html";
>         value="hello" />
>
> 
> Then the page renders as 
> 
> Hello hello 
> 
> So the question becomes: why is my namespace declaration in the 
> tag being ignored in the content page? 
> 
> Further explaination: as I said, I'm using full XML views, so the 
> tag is defined in a separate file (layout.html) and the content 
> (example.html) is pulled in using a <span jsfid="clay"
>  clayJsfid="example.html"> 
>
> It appears that the imported content file isn't inheriting values parsed 
> in the parent. Is there somewhere I can set up the namespaces so that 
> all the content html pages will be aware of them; that is, is there a 
> common root I can use? Having to re-declare the namespaces in every page 
> will be a right pain! 
>

The clay markup parser treats each template file as a separate "document".
The includes are not static but dynamic.  In JSPish terms the Clay template
include is like a JSP include versus a page directive.

<jsp:include page="dynamic.jsp"/>

-- versus --

<jsp:directive.include file="static.jsp"/>


Once a template is parsed, it can be reused by any number of 
templates without reparsing.  

However, the symbols are scoped from the outer template to 
layers of included/nested templates.


> Cheers, 
> Ian. 
> 

Gary

> 
> 

Reply via email to