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] Declaring Namespaces


Hi,

On Mittwoch, 19. November 2008, Lillian Sullam wrote:
>
> I am trying to do an XML to XML translation.  I am using XSLT 1.0 and
> saxon 6.5.5.
>
> Here is my input file:
> [... DocBook5 file ...]
>
> Here is my XSLT 1.0 file:
>
> <?xml version="1.0"?>
> <xsl:stylesheet
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>     xmlns="http://docbook.org/ns/docbook";
          ^^^
Better use a prefix instead of the default namespace:
 
 xmlns:d="http://docbook.org/ns/docbook";


>     xmlns:xl="http://www.w3.org/1999/xlink";
>     version="1.0">
>
> <xsl:output method="xml" version="1.0" indent="yes"/>
>
> <!-- Class -->
> <xsl:template match="sect1/sect1[@*]">
>     <xsl:call-template name="id_sect1"/>
> </xsl:template>

Use the above prefix in all your match attributes:

  <xsl:template match="d:sect1/d:sect1[@*]">

By the way: The above template will never match. DocBook does not allow to 
insert a sect1 into a sect1. Did you mean sect2 for the second sect1?


Hope that solves the problem. :)


Tom


-- 
Thomas Schraitle


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