Subject: Re: [xsl] Getting epub: namespace into root html element From: "Peter West lists@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 28 Jun 2014 00:47:56 -0000 |
On 25 Jun 2014, at 8:37 pm, Abel Braaksma (Exselt) abel@xxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: ... > > Indeed, the xsl:namespace instruction will be ignored or used for all node types except document nodes, which will raise an error. In addition, if the stylesheet is complex, you may want to just add the namespace node to the root node, so that you do not have to add it to all your other node creation instructions: > > <xsl:template match="/*"> > <xsl:copy> > <xsl:namespace name="epub">http://www.idpf.org/2007/ops</xsl:namespace> > <xsl:apply-templates select="@*|node()"/> > </xsl:copy> > </xsl:template> Hi Abel, This also works, provided I retain the original <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> as well. And as you noted, XSLT 3.0 provides html5 output. Peter West "...for I am gentle and lowly in heart, and you will find rest for your souls." Peter West "...for I am gentle and lowly in heart, and you will find rest for your souls."
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Getting epub: namespace i, Abel Braaksma (Exsel | Thread | Re: [xsl] Getting epub: namespace i, Peter West lists@xxx |
Re: [xsl] Getting epub: namespace i, Peter West lists@xxx | Date | [xsl] Creating hierarchies from in-, Peter West lists@xxx |
Month |