This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
Re: [docbook-apps] Linking JavaScript Query
On Thu, May 08, 2003 at 12:02:08AM -0500, David Pratt wrote:
> When linking to a JavaScript file I am including the following in the
> html.head template in
> my customization:
>
> <script type="text/javascript" src="../xhtml-javascript.js"></script>
>
> When my xhtml chunk stylesheet completes its job, this line is
> converted to the following:
>
> <script type="text/javascript" src="../xhtml-javascript.js"/>
>
> This is nice and tidy but my browsers are not liking this and the pages
> will not appear. If I
> manually edit them back to what I placed in the customization, they
> will appear when refreshed.
> Is there a way to control this empty element cleanup to preserve the
> script end element?
If you are using Saxon, then you can use a Saxon extension
to solve this problem. You need to add the saxon namespace
to the customization layer:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
version="1.0">
And then add the Saxon extension output method:
<xsl:output method="saxon:xhtml" />
This will produce what you are looking for.
Note that if you were using xsltproc, you wouldn't have
the problem. It notices the XHTML namespace that
the output is in and adjusts the serialization of
the output to use XHTML syntax, so you get the
output you want.
--
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@sco.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org