This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Re: XSL customization
On Tue, Apr 29, 2003 at 12:56:18PM -0400, Sam Steingold wrote:
> > * In message <20030428094954 dot C21621 at sco dot com>
> > * On the subject of "Re: [docbook-apps] Re: XSL customization"
> > * Sent on Mon, 28 Apr 2003 09:49:54 -0700
> > * Honorable Bob Stayton <bobs at sco dot com> writes:
> >
> > So Sam needs to change his stylesheet file as follows:
> >
> > <xsl:template match="literal[ at role = 'type' or @role = 'sexp']">
> > <tt xmlns="http://www.w3.org/1999/xhtml" role="{ at role}"><xsl:apply-templates/></tt>
> > </xsl:template>
>
> adding xmlns="http://www.w3.org/1999/xhtml" to each and every tag is
> a mouthful (e.g., my user.footer.navigation is a table with 13 elements...)
> is there a cheaper way?
I'm quite sure that controlling verbosity was not
one of the design goals of XML. 8^)
But there is a cheaper way. I think you can set the default
namespace of your customization layer to the XHTML namespace.
Then you don't have to put it on all elements.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
version="1.0">
The second xmlns has no prefix, which means any other elements
in the stylesheet file are considered to be in that default
namespace. That seems to work.
I'm not sure why the xhtml stylesheet doesn't just do it
that way.
--
Bob Stayton 400 Encinal Street
Publications Architect Santa Cruz, CA 95060
Technical Publications voice: (831) 427-7796
The SCO Group fax: (831) 429-1887
email: bobs at sco dot com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org
For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org