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]

Auto refreshing with XSL


Hello all,

I am fairly new to XSL and i have a task that needs some expert assitance.

I have a single xml document containing several different stories (and
various child elements within each <story> which are to be automatically
displayed by using the auto refresh meta tag. There are no scripts involved
as the xml and xsl will be sent to external clients. Each story has an id
attribute which is not always sequential (eg an xml document might have id
=1, id=3, id=4, id=6 etc)

What i wanted to know was a way of only processing the single xml file so
that upon each refresh, a different story would be displayed.

Any idea's anyone? 

Many thanks in anticipation.

Shaun Lizzio

> -----Original Message-----
> From: Michael Kay [mailto:mhkay@iclway.co.uk]
> Sent: Monday, September 17, 2001 3:27 PM
> To: xsl-list@lists.mulberrytech.com
> Subject: RE: [xsl] Setting a base href in xsl:include
> 
> 
> > I'm trying to avoid the use of a fully qualified
> > URL in the xsl:include statement for portability
> > reasons....
> >
> > For example,
> > <xsl:include href="common.xsl" /> won't work for
> > me because it is not in context with the executing
> > program (Java).
> 
> I'm not quite sure what you mean by that... presumably the 
> problem is that
> the base URI of the stylesheet is either unknown, or 
> different from that
> required to use common.xsl as a relative URI.
> 
>   My ideal solution is to pass the
> > base href in an XSL parameter and say:
> > <xsl:include href="concat($baseUrl, 'common.xsl')
> > />....but the processor does not seem to
> > dereference or resolve any parameters within the
> > include statement.
> 
> Correct, the value of the parameter is a (relative or 
> absolute) URI, it
> can't be an expression that is evaluated to produce a URI, or even an
> attribute value template.
> >
> > Also, within the Xalan API, I do not see any way
> > to set a base href within the Source interface,
> > which is how one needs to feed a stylesheet into
> > the tranformation process.
> 
> You should be able to do that using the setSystemId() method 
> on the Source
> interface.
> 
> An alternative is to define a URIResolver and handle the URI 
> in your own
> code, returning the included stylesheet module as another 
> Source object.
> 
> Mike Kay
> 
> 
>  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]