Subjects
Home
Xalan extension functions
Fomatting question serializing DOM with pretty print
xalan with pull parser
Cannot find the declaration
Apache Xalan drop support to run on JRE 1 1 x
Why does Doctype change processing of a document
Node set to XML string via Java extensions in Xalan J: possible?
Templates/Transformers + thread safety???
Problem evaluating xpath with muliple prefix with different namespace
remove an arbitrary attribute from xsl output
Xalan3 XSLT 2 0 XPath 2 0 support?
Problem using compiled translets with Xalan !!
Xalan and jstl 1 1 problem with transform tag
NullPointer in DOM2DTM getLocalName
URIResolvers base parameter with xsltc and cascaded imports
Performance problem for Xalan J on intel dual core
Standard libraries in JAXP?
Serializing a DOM tree to XML file, customize entities replacement
Library Conflict Involving BCEL Library
A question on how users are using <xsl:message >
Kevin Cormier as a new Apache Xalan J committer
Struggling to iterate over tokenized string
Xalan count() trouble
Problem with recursive xpath
Error when switching to java 1 5
document( ' ')
Problem with Xalan2 7 0 transformation
cr/lf options
entity encoded XML
can xalan transform 2 xml using one xslt?
Xalan J JIRA defect review Monday October 16, 2006 from 2:00 to 3:30 pm ED
xsl transform with cdata section elements
xslt parameters not expanded
Weird behavior of XPath evaluate()
How to avoid <xsl:message > instruction prints stylesheet file informations ?
Cannot find SimpleTransform subdirectory after installing Xalan J
recover from document not found exceptions
jdk1 5 and Xalan jar differences?
Performance Issue
Error/Bug adding floating point numbers
XPathAPI: eval exp using nodes with default namespace
modifying xalan to output invalid XML
NullPointerException
mege two separate xml nodes into one
Is this a XALAN document identification bug?
is StylesheetRoot really java io Serializable ?
transform() fails for DOMSource but succeeds for StreamSource
Thoughts on Transformer parameter passing
HELP, Xalan and jstl 1 1 problem with transformer
Problem with XPath namespace axis?
string utils:replace deleting search string if replacement string is an HTML
help with enumeration values pls
xalan 2 5 1 vs 2 7 performance question
How to insert/update in XML document
HTML Serialization and Handling of Ampersands in HREF Attributes
XHTML link tag stripping
SystemId Unknown; Line #24; Column #49; java lang NullPointerException
xpath text() help
Apostrophe problem with xalan 2 7 0
How to set variables in XML document?
Links
Home
Oracle database error code ...
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
URIResolvers base parameter with xsltc and cascaded imports

URIResolvers base parameter with xsltc and cascaded imports

2006-08-14       - By Timothy Jones
Reply:     1     2     3     4     5     6     7  

My initial feeling is that the person who designed the method signature
for URIResolver.resolve() felt that base and current would have been
sufficient (and for only two levels, it is!)   Stated another way, you
are a trailblazer for constructing a dependency tree of three levels.



tlj

-----Original Message-----
From: Holger Dehnhardt [mailto:dehnhardt@(protected)]
Sent: Monday, August 14, 2006 11:00 AM
To: xalan-j-users@(protected)
Subject: Re: URIResolvers base parameter with xsltc and cascaded imports

Hey Timothy, (and "Guten Abend";-)

first - thanks for the proper restatement!

The tip with the pop/pushStylesheet methods may be useful. I will wait,
if
Yash can give me further information but then it might be possible to
implement a callback in these methods and keep track of the 'stacklevel'
in
my URI-Resolver.
But first, I would be happy to know, if the current behaviour is
expected or a
bug.

Holger

Am Montag, 14. August 2006 16:36 schrieb Timothy Jones:
> Guten Tag, Holger!
>
> In my app, I have implemented a short URIResolver anonymous class that
> decides, depending on a configuration variable, to open xsl:include'd
> stylesheets from either Class.getResourceAsStream or
> URLConnection.getOutputStream.
>
> But in my application, I have one central stylesheet that is included
> from many others, but it is only one level deep.   That is why I
didn't
> reply the first time you posted.
>
> The processor is obviously keeping a proper stack somewhere inside,
but
> the difficulty seems to be that from within the URIResolver interface,
> you are only given access to the base (bottom of the stack) and the
> current (the top of the stack).  With only two levels of inclusion,
this
> is sufficient, but with three or more levels, you cannot see the
middle
> elements.  Is this a decent restatement of the problem?
>
> I can see where it would be nice to have access to the stack that
> org.apache.xalan.processor.ProcessorInclude.startElement has access to
> (StylesheetHandler.popStylesheet() and pushStylesheet()), but I have
no
> idea if this is even a good direction to go towards, let alone the
best
> way to expose it (and of course, changing a public interface like
> URIResolver would be pretty disruptive).
>
> I wish this post were more helpful.  But I am just an xalan user, too,
> not a developer.
>
>
>
>
> tlj
> -----Original Message-----
> From: Holger Dehnhardt [mailto:dehnhardt@(protected)]
> Sent: Monday, August 14, 2006 9:29 AM
> To: xalan-j-users@(protected)
> Subject: Re: URIResolvers base parameter with xsltc and cascaded
imports
>
> Hello!
> Sorry for asking again, but I really need some advice with the problem
> described below.
> Is anyone here who has written an URIResolver or can help in any way,
or
>
> should I ask on the developers list?
>
> Thanks Holger
>
> Am Montag, 24. Juli 2006 17:26 schrieb Holger Dehnhardt:
> > Hello,
> >
> > I'm trying to write my own URIResolver to keep track of changes in
>
> imported
>
> > stylesheets when compiling the main stylesheet.
> > Lets have this layout
> >
> > 1) http://localhost/main.xsl includes layouts/heads.xsl
> > 2) heads.xsl includes ../helpers/someFunctions.xsl
> > 3) http://localhost/main.xsl includes layouts/footers.xsl
> >
> > The interface method "resolve" in my uri-resolver is called three
>
> times
>
> > with the following parameters:
> >
> > 1) href=layouts/heads.xsl base=http://localhost/main.xsl
> > 2) href=../helpers/someFunctions.xsl base=http://localhost/main.xsl
> > 3) href=layouts/footers.xsl base=http://localhost/main.xsl
> >
> > even if the file is included from another stylesheet like 2), the
base
>
> does
>
> > not change.
> > Storing the base is no solution,
> > in 1) the base would be http://localhost/layouts/heads.xsl
> > but in 2) it would be http://localhost/helpers/someFunctions.xsl
> > and 3) would fail.
> >
> > Is this expected behaviour and if so, how can I manually keep track
of
>
> the
>
> > base?
> >
> > Thanks Holger