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] | [Elist Home]


Subject: DOCBOOK-APPS: Re: XSL: Docbook to foreign DTD


>>>>> "Bob" == Bob Stayton <bobs@caldera.com> writes:

[Using Namespace in XSL to generate XSL from Docbook]

 Bob> You need to make a couple of changes to get the namespace into
 Bob> the attribute name.  First, you need to declare the namespace
 Bob> and prefix in your stylesheet:

 Bob> <xsl:stylesheet 
 Bok>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 Bob>     xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">

That leaves me with the top level element
<book xmlns:xlink="http://www.w3.org/1999/xlink">, where the
xmlns:xlink attribute  is not declared in the DTD.  What I do have in
the DTD is:

<!ATTLIST xref
               %commonattr;
               xmlns:xlink   CDATA    #FIXED  "http://www.w3.org/1999/xlink"  
               xlink:type    (simple | extended | resource | locator | arc | title | none) #IMPLIED
               xlink:href    CDATA    #REQUIRED

So I think I can skip the xmlns declaration in the top level element.
Is there an XSL way to do it?  Using sed might not be that
appropriate...

 Bob> Then you need to remove the "xlink:" prefix from the name
 Bob> attribute value, and add a namespace attribute to the
 Bob> <xsl:attribute> element:

[deleted], yes that works.  Thanks for your help.

 Bob> This works with xsltproc and saxon.

I do use xsltproc for now.

Jochen

-- 
#include <~/.signature>: permission denied




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


Powered by eList eXpress LLC