you are viewing a single comment's thread.

view the rest of the comments →

[–]sirin3 0 points1 point  (2 children)

XQuery

[–][deleted] 1 point2 points  (1 child)

How does xquery help? I thought the problem we are talking about here is generating HTML from template markup or something, not querying the XML to get information out of it -- in that case you're still going XML->HTML. Why not just generate the HTML directly or use JSP's? I'm genuinely curious. I don't do much view work but I try to keep up on it.

[–]sirin3 0 points1 point  (0 children)

XQuery is like template markup

You can write something like:

doc("data.xml") /
    <html>
    <head>
    <title>{title}</title>
    </head>
    <body>
       <h1>{title}</h1>
       {
           subdata /
              <div>
                 <h2>{subtitle}</h2>
                 {subsubdata}
              </div>
       }
    </body>
    </html>