problem with substring / html template

wxdqz

New Member
Hi,

I have an xml query that looks like this:

let $all := document('/db/webapp/template2.xml')/template
return $all

which returns the contents of that template - i.e. the html body of a document with all the tags. I want my xql file to generate the content of this, so I want to split the file into a header and a footer. In order for it to remain a valid xml document, it has to stay in one piece.

To use this as a template for all my pages, I wanted to use substring, like this:

let $all := document('/db/webapp/template2.xml')/template
return substring($all,1,300)

However, when I use substring on it, all the tags are removed...

Can anyone tell me how I can keep the tags, or if there is one, a better way of doing this?? Something like the 'includes' tag in php??

Cheers,
GB
 
Back
Top