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: One XSL combining to different XMLs


Hi Jeni,

    I've been trying to imbbed debugging code in the 'LstXMLAccountPG.jsp' and
got the results (like system.out). This means that there is no error with
referencing the file since it is found and executed. I m afraid it is something
with the following code but I m really stuck with this.

Thanks for all the help.


Jeni Tennison wrote:

> Walid,
>
> >I've been trying to use the document() function where I put:
> >
> >    <xsl:variable name="tot"
> >select="document('../AccountPG/LstXMLAccountPG.jsp')" />
> >
> >Then did:
> >
> >    <xsl:apply-templates select="$tot/RangeList/Range1"/>
> >
> >and tried to debug using
> >
> >    <xsl:template match="Range1">
> >    <H1> HELLO WORLD </H1>
> >    </xsl:template>
> >
> >But didn't get any output knowing that I m sure that the xml data is
> >being constructed and no errors are showing.
>
> Presumably you've tried running the relevant parts of the stylesheet on
> 'LstXMLAccountPG.jsp' as the input, and know that the templates are working
> OK?
>
> I might be off here, but there could be a problem with resolving the
> (relative) path within the document() function.  If you only use one
> argument, the document() function resolves relative paths according to the
> Base URI of the stylesheet itself.  It may be that you want to resolve the
> relative path according to the Base URI of the input XML that you have.  In
> that case, then you should try:
>
>   <xsl:variable name="tot"
>     select="document('../AccountPG/LstXMLAccountPG.jsp', /)" />
>
> Or, of course, change the relative path to be relative to the location of
> the stylesheet.
>
> It's (perhaps unfortunately) perfectly legal for a XSLT processor not to
> complain if it can't find the file when the document() function is used, in
> which case it gets an empty node list, which would give the result that
> you're experiencing.
>
> I hope that helps,
>
> Jeni
>
> Dr Jeni Tennison
> Epistemics Ltd, Strelley Hall, Nottingham, NG8 6PE
> Telephone 0115 9061301 • Fax 0115 9061304 • Email
> jeni.tennison@epistemics.co.uk


 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]