This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: xsl to xsl doing it right


Ahh....very interesting stuff.

So the
<xsl:namespace-alias stylesheet-prefix="alex" result-prefix="xsl"/>
refers only to the namespace URI, and is only guaranteed to switch the URI's
in the output.
Well Stephen's info is true to form. I'm using xalan and get alex: in my
result.  The output generated is indeed valid, but I switched the order so I
get xsl: as the result prefix anyway.

So since alex is a valid prefix, I'll use this:

<alex:namespace-alias stylesheet-prefix="alex" result-prefix="xsl"/>

And switch all instances of xsl: with alex: and vice versa in the
stylesheet.
I know there's nothing special about xsl but what can I say, I like it.  It
makes me feel safe.

Thanks for all your help folks!
Alex
-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Blake,
Stephen
Sent: Wednesday, April 04, 2001 4:31 PM
To: 'xsl-list@lists.mulberrytech.com'
Subject: RE: [xsl] xsl to xsl doing it right


Hi Alex,

I think it might be an XSLT engine problem. Which processor are you using? I
got the correct result with most processors, below are my findings:

processor        result
---------------- ------
msxml            xsl
sablotron (v .5) xsl
oracle           alex
xalan            alex
saxon            xsl

Stephen Blake
Veritect
s t e p h e n . b l a k e @ v e r i t e c t . c o m

-----Original Message-----
From: Alex Reuter [mailto:areuter@monsterdaata.com]
Sent: Wednesday, April 04, 2001 4:08 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl to xsl doing it right


Hello List,
Wow.

>Is it possible to post both the input and stylesheet document?

OK.  Here's the input.
[snip]
*************
HERE's the stylesheet
*********************
[snip]
***********************
Here's My Result
*****************
[snip]
********************

Theres alot here, but I appreciate anyone who cares to take the time to help
me on this.

Thanks Again!!!
Alex



-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Darrin Bishop
Sent: Wednesday, April 04, 2001 3:29 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl to xsl doing it right


Is it possible to post both the input and stylesheet document?

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Alex Reuter
Sent: Wednesday, April 04, 2001 2:02 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl to xsl doing it right


OK.
I switched the switches(i'm embarrased to have posted that code - it was an
aborted fix attempt) but still am getting the same results.

I wonder, right now I'm declaring the xmlns:alex as an attribute of
xml:stylesheet, like so:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:alex="result.xsl"  version="1.0">

If i remove the xmlns:alex= part xalan gives me the following error:
XSLT: Missing namespace URI for specified prefix

and if I use the following url as in
xmlns:alex="http://www.w3.org/1999/XSL/Transform"; i get this error:
XSLT: Unknown XSL element: stylesheet

hmmm.......
The concept seems straightforward to me but its just not working.  Is it
possible that some other section of my code could be the culprit?
Thanks again,
Alex

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Darrin Bishop
Sent: Wednesday, April 04, 2001 2:25 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl to xsl doing it right


I think this is what you need.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>   <!-- change here -->
<xsl:namespace-alias stylesheet-prefix="alex" result-prefix="xsl"/> <!--
change here -->
<xsl:output method="xml"/> <!-- change here -->
<xsl:template match="/">
<alex:stylesheet version="1.0">

notice that result-prefix attrib is xsl which is linked to
"http://www.w3.org/1999/XSL/Transform";

....

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Alex Reuter
Sent: Wednesday, April 04, 2001 12:44 PM
To: xsl-list@lists.mulberrytech.com
Subject: RE: [xsl] xsl to xsl doing it right


Hello List,

Thanks for all your help.  There's something weird going on though in my
attempt to implement your suggestions.
Here is my namespace aliasing code...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; xmlns:alex=
"alex-namespace" >
<xsl:namespace-alias stylesheet-prefix="xsl" result-prefix="alex"/>
<xsl:output method="xsl"/>
<xsl:template match="/">
<alex:stylesheet version="1.0">

The xml is processed correctly and everything seems to work properly
except....In the output alex is not replaced with xsl.

hmmmmm.....
Any more suggestions?
Thanks again!
Alex



-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Simon Wickes
Sent: Tuesday, April 03, 2001 4:26 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] xsl to xsl doing it right


At 03:57 PM 4/3/01 -0400, you wrote:
>Hello,
>I'm trying to output an xsl using xsl and am having a hard time
>distinguishing which parts i want the processor to actually process and
>which parts are meant to be straight output.  <xsl:text> doesn't seem to be
>any help and <![CDATA escapes all the brackets making the output useless.
>Any suggestions?

Doh.

OK, the preferred method is to use namespace-alias:

<xsl:namespace-alias stylesheet-prefix="simon" result-prefix="xsl"/>

and then your xsl looks like this

<xsl:template match="/">
<simon:template match="whatever">....

much cleaner.


Simon

xmlgeek@email.com


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


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


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


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


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


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

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]