[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Getting epub: namespace into root html element

Subject: Re: 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
Re:  Getting epub: namespace into root html element
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.