RE: Clay full-xml and namespace ignoring my tags

2007-05-03 Thread Torsten Krah
Look at my post and the answers on the list about:

Clay Symbols aren't namespace aware - would be nice to have, wouldnt it

The imported content is precompiled and added after that, because of
that, namespaces declared in other files don't get applied to the
included ones.

Torsten

Am Donnerstag, den 03.05.2007, 13:17 +0100 schrieb Ian.Priest:
 
  -Original Message-
  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:
  
  
  
  html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
  
  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;
  
  
  
  ...
  
  
  
span jsfid=h:outputText value=hello /
  
h:outputText value=hello /
  
  
  
  ...
  
  /html
  
  
  
  In the rendered page I get:
  
  
  
hello
  
h:outputText value=hello /
  
  
  
  
  
  So Clay is happily replacing my span jsfid=... 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 html
 tag being ignored in the content page? 
 
 Further explaination: as I said, I'm using full XML views, so the html
 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 dynamic import.
 
 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!
 
 Cheers,
 Ian.
 
 
 


smime.p7s
Description: S/MIME cryptographic signature


RE: Clay full-xml and namespace ignoring my tags

2007-05-03 Thread Gary VanMatre
  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