In terms of the merits of creating an entire website by generating xhtml
out of xquery, we do it all the time here at Mark Logic, with
markmail.org being a marquee example of what can be done.

Our fastest-moving customers do it this way when they can, because they
can build websites on top of their content sets faster this way than any
other.  (Often, MarkLogic users don't start out this way, because they
are looking for the least disruptive way to introduce MarkLogic into
their development environments.  By the time a couple of years pass,
they've figured out that the way they develop all their internal
proofs-of-concept could be the way they develop applications.)  A few
folks take a bolder step, embracing the full "X" stack:  XML -> XQuery
-> XHTML from the start.

If you try it yourself, you'll eventually find some web site management
and programming techniques that you can't quite get your hands on
directly.  Based on what we covered at the user conference, MarkLogic
Server 4.0 is expected to close a number of those gaps.

markmail.org, which is running on MarkLogic Server 3.2, gets everything
it needs out of the combination of a slick hardware load balancer, squid
(which we use for reverse proxy), and MarkLogic Server dynamically
generating Javascript-enhanced XHTML.  There's nothing else between you
and the content.  If you'd like to learn a little more about the
approach, this presentation is a decent start:
http://markmail.blogspot.com/2007/12/keynoting-xml-2007.html

ian

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Eric Palmitesta
> Sent: Wednesday, August 27, 2008 2:54 PM
> To: ML Developer Mailing List
> Subject: [MarkLogic Dev General] Quirks of generating xhtml 
> with xquery
> 
> Aaron and I discussed this briefly at the training seminar, 
> but I'd like to get a sense of what other developers are 
> doing to get around the quirks of generating xhtml with 
> xquery (rather than a java servlet/jsp based website which 
> pulls records from MarkLogic via XDBC/XCC.
> 
> One such quirk: Childless elements with no internal nodes and 
> an explicit closing tag are automatically folded into 
> elements with no closing tag.  <div></div>, which is valid 
> xhtml, will become <div /> after being processed by MarkLogic 
> (breaks visual representation).  Some better examples are 
> <script ...></script> and <textarea></textarea>, which are 
> expected to contain no internal nodes in xhtml.
> 
> I've taken to writing things like
> 
> <script ... >{" "}</script>
> 
> or
> 
> <textarea>&nbsp;</textarea>
> 
> which successfully preserves the explicit closing tag, 
> keeping xhtml happy.  Is there a more elegant way to do this?
> 
> Are there other banana-peels I should watch out for when 
> generating xhtml with xquery?  Is creating an entire website 
> by generating xhtml with xquery generally frowned upon, or 
> accepted?  Admittedly, it seems less flexible than a <web 
> language>-based site, however the xdmp namespace seems to 
> provide sufficient functionality, and transforming xml data 
> into xhtml is incredibly easy with xquery.
> 
> Cheers,
> 
> Eric
> 
> 
> PS
> My vocabulary might be incorrect regarding words like 'tag' 
> and 'node', please correct me if necessary.
> 
> PPS
> I can see the archives at 
> http://xqzone.marklogic.com/pipermail/general/
> but are they searchable?  I have a feeling newcomers such as 
> myself will be prone to asking questions which have already 
> been discussed at length.
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general
> 
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to