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

Re: Beginner: adding xmlns:mml attribute

Subject: Re: Beginner: adding xmlns:mml attribute
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Thu, 9 Jan 2003 09:57:27 +0000
xsltproc processing instruction
Hi Roel,

>> What the stylesheet gives me, with Saxon 6.5.2, from an input document
>> with an empty <document> element, is:
>
> Right, this is what seems to be causing problems: the processor. I was 
> using xsltproc, and it didn't give me the xmlns part in the html tag. 
> Saxon does. Which one is right? Can they both be right? Should I notify 
> anyone of a bug?

Saxon is right (it usually is). You should notify Daniel Veillard of
the bug in xsltproc.

> Anyway, another difference between Saxon & xsltproc now shows up: if
> I put inside the <head></head> tags of my xsl sheet
>
> <![CDATA[ <?import namespace="mml" implementation="#MathPlayer" ?> ]]>
>
> and I process it with xsltproc, I get
>
> <?import namespace="mml" implementation="#MathPlayer" ?>
>
> in my output sheet, as I expected (maybe wrong so).
>
> When I then process the same file with saxon, I get
>
> &lt;?import namespace="mml" implementation="#MathPlayer" ?&gt;
>
> which is not what I want :(
> Which processor is right? What is the right way to do this?

Again, Saxon is right. Here, you want to create a processing
instruction; to do that, you should use the
<xsl:processing-instruction> instruction as follows:

  <xsl:processing-instruction name="import">
    <xsl:text>namespace="mml" implementation="#MathPlayer"</xsl:text>
  </xsl:processing-instruction>

The same goes for creating comments: use the <xsl:comment> instruction
rather than including the comment literally, or wrapped in a CDATA
section, within your styelsheet:

  <xsl:comment>This is a comment</xsl:comment>

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 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.