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] Unwanted xmlns in attribute for ePub3 template


On 17.4.2012 23:11, Carlos Araya wrote:

> and now it validates.  I think my question is whether we can skip the NS declaration and use the default from the package. Either way I'm good :-)

Please note that xsl:import/xsl:include doesn't affect in-scope
namespaces. So if you are emitting namespaced elements in your
customization layer, you must specify appropriate namespace declaration
in this customization layer, nothing is inherited from imported/included
stylesheets.

				Jirka

> Carlos
> 
> 
> On Apr 17, 2012, at 12:16 PM, Bob Stayton wrote:
> 
>> Actually, you do need a namespace in your output, just not the null namespace.  Epub3 output elements must be in the XHTML namespace.  Any customization layer must declare the default output namespace like this:
>>  
>> <xsl:stylesheet  xmlns="http://www.w3.org/1999/xhtml"; ...
>>  
>>  
>> Bob Stayton
>> Sagehill Enterprises
>> bobs@sagehill.net
>>  
>>  
>> ----- Original Message -----
>> From: Carlos Araya
>> To: docbook-apps@lists.oasis-open.org
>> Sent: Tuesday, April 17, 2012 11:34 AM
>> Subject: [docbook-apps] Unwanted xmlns in attribute for ePub3 template
>>
>> I am working with ePub3 ebooks and have found the following problem. 
>>
>> I've added the template below to my customization layer for ePub3 publishing
>>
>> <xsl:template name="user.manifest.items">
>> <item id="font1" href="DejaVuSansMono.ttf" media-type="font/truetype"/>
>> <item id="font2" href="GraublauWeb.otf" media-type="font/opentype"/>
>> <item id="font3" href="GraublauWebBold.otf" media-type="font/opentype"/>
>> </xsl:template>
>>
>> It adds the items as requested but it inserts an empty xmlns="" declaration. The resulting lines in the manifest file look like this:
>>
>>    <item xmlns="" id="font1" href="DejaVuSansMono.ttf" media-type="font/truetype"/>
>>    <item xmlns="" id="font2" href="GraublauWeb.otf" media-type="font/opentype"/>
>>    <item xmlns="" id="font3" href="GraublauWebBold.otf" media-type="font/opentype"/>
>>
>> and produces the following error in epubcheck B4
>>
>>     [java] ERROR: docbook-howto.epub/OEBPS/package.opf(36,86): element "item" not allowed anywhere; expected the element end-tag or element "item" (with xmlns="http://www.idpf.org/2007/opf";)
>>
>> Is there a way to remove the namespace declaration or a template that I can edit to make the change locally?
> 
> 
-- 
------------------------------------------------------------------
  Jirka Kosek      e-mail: jirka@kosek.cz      http://xmlguru.cz
------------------------------------------------------------------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 member
------------------------------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature



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