OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] xsl:copy-of Syntax Question


Hi Ray,

At a quick scan it looks like you are referring to no namespace elements 
in your copy-of instruction, see
<xsl:copy-of select="$foo-header/html/head/node()"/>

while your document contains elements with the same local name but in 
the http://www.w3.org/1999/xhtml namespace.

Therefore my suggestion will be to define the 
http://www.w3.org/1999/xhtml namespace in your stylesheet mapped for 
instance to the xhtml prefix and use that in your name tests in the 
XPath expression, like below:

<xsl:copy-of xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
select="$foo-header/xhtml:html/xhtml:head/node()"/>

Hope that helps,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com


Miller, Ray (Centech) wrote:
> 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
> 
>  
> 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]