You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Norman Walsh <nd...@nwalsh.com> on 2001/03/11 20:21:46 UTC

Base URI for org.apache.xalan.xslt.extensions.Redirect

I was slightly surprised to discover that the base URI for the Redirect
extension is the stylesheet that contains the template performing the
redirect. I expected it to be the base URI of the source document.

I'm not sure that the answer I was expecting is any more or less right,
but since I need the result to be relative to the location of the source
document, what should I do?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM    | There are no new truths, but only truths
XML Standards Engineer       | that have not been recognized by those
Technology Development Group | who have perceived them without
Sun Microsystems, Inc.       | noticing.--Mary McCarthy


Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| The command line versions that use -out will use that to create the
| Result argument.  If you leave off the -out argument, the command line
| version will write the output to System.out.  Therefore, Redirect will
| use the source URI, if available, or the current working directory, if
| not.

Fair 'nough. Thanks, Gary.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM    | On the other hand, you have different
XML Standards Engineer       | fingers.
Technology Development Group | 
Sun Microsystems, Inc.       | 

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Gary L Peskin <ga...@firstech.com>.
Norman Walsh wrote:
> 
> / Gary L Peskin <ga...@firstech.com> was heard to say:
> | We'll take that from the systemID of the Result argument supplied to the
> | transform call.
> 
> And what will that be if I run Xalan from the command line?

Norm --

The command line versions that use -out will use that to create the
Result argument.  If you leave off the -out argument, the command line
version will write the output to System.out.  Therefore, Redirect will
use the source URI, if available, or the current working directory, if
not.

Gary

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| We'll take that from the systemID of the Result argument supplied to the
| transform call.

And what will that be if I run Xalan from the command line?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM    | Time wounds all heels.
XML Standards Engineer       |
Technology Development Group | 
Sun Microsystems, Inc.       | 

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Gary L Peskin <ga...@firstech.com>.
Norman Walsh wrote:
> 
> / Gary L Peskin <ga...@firstech.com> was heard to say:
> | Just a correction on this.  Our fix is to make things relative to the
> | base URI of the result document, not the source document.  Will that
> | work for you?
> 
> That'll probably work, but how are you going to do that? What's the base
> URI of the result tree before it's serialized?

We'll take that from the systemID of the Result argument supplied to the
transform call.

Gary

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| Just a correction on this.  Our fix is to make things relative to the
| base URI of the result document, not the source document.  Will that
| work for you?

That'll probably work, but how are you going to do that? What's the base
URI of the result tree before it's serialized?

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM    | A life, admirable at first sight, may
XML Standards Engineer       | have cost so much in imposed
Technology Development Group | liabilities, chores and self-abasement,
Sun Microsystems, Inc.       | that, brilliant though it appears, it
                             | cannot be considered other than a
                             | failure. Another, which seems to have
                             | misfired, is in reality a triumphant
                             | success, because it has cost so
                             | little.--Henry De Montherlant

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Gary L Peskin <ga...@firstech.com>.
Gary L Peskin wrote:
> 
> Norman Walsh wrote:
> >
> > I was slightly surprised to discover that the base URI for the Redirect
> > extension is the stylesheet that contains the template performing the
> > redirect. I expected it to be the base URI of the source document.
> >
> > I'm not sure that the answer I was expecting is any more or less right,
> > but since I need the result to be relative to the location of the source
> > document, what should I do?
> >
> >                                         Be seeing you,
> >                                           norm
> >
> > --
> > Norman.Walsh@East.Sun.COM    | There are no new truths, but only truths
> > XML Standards Engineer       | that have not been recognized by those
> > Technology Development Group | who have perceived them without
> > Sun Microsystems, Inc.       | noticing.--Mary McCarthy
> 
> Hi, Norm --
> 
> This is on our list of things to fix.  How are you invoking the
> transform? In other words, are you doing it from the command line or
> calling the Transformer.transform method or something else?  If it's
> something else, please let us know.
> 
> Gary

Norm --

Just a correction on this.  Our fix is to make things relative to the
base URI of the result document, not the source document.  Will that
work for you?

Gary

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Norman Walsh <nd...@nwalsh.com>.
/ Gary L Peskin <ga...@firstech.com> was heard to say:
| This is on our list of things to fix.  How are you invoking the
| transform? In other words, are you doing it from the command line or
| calling the Transformer.transform method or something else?  If it's
| something else, please let us know.

I'm just running a Xalan transformation from the command line, nothing
fancy.

                                        Be seeing you,
                                          norm

-- 
Norman.Walsh@East.Sun.COM    | The perfect man has no method; or rather
XML Standards Engineer       | the best of methods, which is the method
Technology Development Group | of no-method.--Shih-T'ao
Sun Microsystems, Inc.       | 

Re: Base URI for org.apache.xalan.xslt.extensions.Redirect

Posted by Gary L Peskin <ga...@firstech.com>.
Norman Walsh wrote:
> 
> I was slightly surprised to discover that the base URI for the Redirect
> extension is the stylesheet that contains the template performing the
> redirect. I expected it to be the base URI of the source document.
> 
> I'm not sure that the answer I was expecting is any more or less right,
> but since I need the result to be relative to the location of the source
> document, what should I do?
> 
>                                         Be seeing you,
>                                           norm
> 
> --
> Norman.Walsh@East.Sun.COM    | There are no new truths, but only truths
> XML Standards Engineer       | that have not been recognized by those
> Technology Development Group | who have perceived them without
> Sun Microsystems, Inc.       | noticing.--Mary McCarthy


Hi, Norm --

This is on our list of things to fix.  How are you invoking the
transform? In other words, are you doing it from the command line or
calling the Transformer.transform method or something else?  If it's
something else, please let us know.

Gary