logo       


[xmlc] Headers and footers: msg#00002

Subject: [xmlc] Headers and footers
I can only think of two ways to achieve common headers
and footers on a web page generated with XMLC, and
neither works:

1) The built-in SSI mechanism.  This will load in a
header.html and footer.html into the top and bottom of
your web page wherever you put the SSI directives
BEFORE running the XMLC interface generation.  So lets
say I have index.html and products.html, and I have a
<span id="siteName">site</span> in my header.html that
both index.html and products.html include.  So I'll
get interfaces indexHTML and productsHTML, both of
which will have a method setTextSiteName().  But
because they don't extend a common interface with that
method, my code to set the site name has to use
reflection to call the setTextSiteName() method.  That
sucks.

2) DOM import.  Say I make a file called template.html
that contains my header and footer information in it,
and has a <div id="content"> in the middle of it where
I want my page content to go.  I can set my dynamic
header content with my templateHTML interface, and I
can set my dynamic page content with my productsHTML
interface.  And then I can say:

Element contentDiv =
templateXmlObj.getElementContent();
Node migratedContent =
contentDiv.getDocument().importNode(productsXmlObj,
true);
contentDiv.appendChild(migratedContent);

...and then just write the templateXmlObj to the
response with the content from the products page
inserted.  Right?  Wrong.  Line 2 above throws a:
org.w3c.dom.DOMException: Node type being imported is
not supported
        at
org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.java:1049)
        at
org.enhydra.apache.xerces.dom.CoreDocumentImpl.importNode(CoreDocumentImpl.java:860)

So wtf?  Surely someone has succeeded in creating a
webapp based on XMLC with common (and dynamic!) header
and footer code.  What am I missing?  Is there another
way?

Thanks,
Erik


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

--
You receive this message as a subscriber of the xmlc@xxxxxxxxxxxxx mailing list.
To unsubscribe: mailto:xmlc-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe