← Prev in month ← Prev in thread

xsl:copy-of Syntax Question

From
Miller, Ray \(Centech\) <>
Date
2007-02-10T22:18:34+00:00
ID
Thread
xsl:copy-of Syntax Question
docbook-rnc- 5.0cr1 xsl-1.72 oXygen-8.1 (eclipse-3.2.1
plugin)

 

Really a generic xsl question but …

 

Consider the following:

 

foo-header.html:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"

   
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">

   <head>

…

…

   </head>

   <body/>

<html>

 

foo-profile-chunk.xsl (extends html/profile-chunk.xsl):

 

<xsl:template name="foo.header">

     <xsl:variable
name="foo-header"

        
select="document('/D:/workspace/foo/fooInternet/trunk/xsl/html/foo-header.html',/)"/>

     <xsl:copy-of
select="$foo-header/html/head/node()"/>

</xsl:template>

…

…

<xsl:template
name="chunk-element-content">

   …

   …

   <html
xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en">

      <head>

         <xsl:call-template
name="foo.header" />

      </head>

      <body>

        …

        …

      </body>

   </html>

   …

   …

</xsl:template>

 

The aforementioned transforms if the !DOCTYPE declaration
is excluded from foo-header.html.

 

What is the correct xsl:copy-of and/or document syntax which
would allow the !DOCTYPE declaration
to remain in foo-header.html?

 

Ray
← Prev in month ← Prev in thread