I'm creating an HTML using XSLT transformation run on xml content. The xml content is dynamic hence the resultant HTML can spread over more than one page. I would like to include a header and footer in each output page of HTML. Is there a way to do this XSLT transformation or HTML tricks ?
相关问题
- Views base64 encoded blob in HTML with PHP
- Is there a way to play audio on a mobile browser w
- HTML form is not sending $_POST values
- implementing html5 drag and drop photos with knock
-
Why does the box-shadow property not apply to a
Is the XSL generating more than one HTML file? If so, you can definitely include a header and footer in each HTML file.
If you’re only generating one HTML document, there isn’t really the concept of a “page”, unless you mean the series of screens a user sees as they scroll down. In that case, you’d need to use CSS to make the header and footer stay visible.
Or is this HTML being used to generate a PDF? Please explain further.
Let's say I had an XML structure like this:
and a stylesheet to transform the above XML:
which imports another stylesheet:
would result in:
Notice the document has the <header/> element but not the <footer/> element and how the stylesheet(s) transform(s) them differently; e.g, <xsl:template match="header"/> versus <xsl:template name="footer"/>!
I don't know if this clears your doubt; in case you need in-depth explanation, do not hesitate to let me know :)