[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML source with DOCTYPE declaration

Subject: Re: XML source with DOCTYPE declaration
From: Zeljko Rajic <zeljko.rajic@xxxxxxxxxx>
Date: Mon, 23 Apr 2001 15:29:49 +0200
xlst format doctype
Hi Jeni,

I can't use the second suggestion as it uses XSLT extensions.  :(  The
stylesheet(s) should work with any XLST processor.

It's really hard to believe that such a 'trivial' thing is causing such
'sophisticated' stylesheets!!  :(

A solution I was thinking of looks something like this (not in XSL
syntax):

1. If DOCTYPE used, then "$xmlnsprefix = 'html'", else "$xmlnsprefix =
'html'"
2. Doing template matches like this:
	<xsl:template match="{$xmlnsprefix}:html">       or
	<xsl:template match="{$xmlnsprefix}:body">

But I have no idea how to check in the stylesheet if a DOCTYPE was used
in the XML file which is going to be transformed. And I'm not sure if
the <xsl:template match.../> tag would work as described/intended
above??

Is it possible that I'm the first with this problem??  Somehow I can't
believe this.

Anyway, another unwanted behaviour is, that the namespace attribute is
added to every tag in the output file when the source XML file contains
the DOCTYPE:

<h1 xmlns:html="http://www.w3.org/1999/xhtml">  or  <p
xmlns="http://www.w3.org/1999/xhtml"/>

Is there a way to avoid this??


Again thanks for your great support !!  :)

- Zeljko

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.