[4suite] stylesheet include path

Mike Brown mike at skew.org
Mon May 6 12:14:16 MDT 2002


Uche Ogbuji wrote:
> do you ever do relative URL resolution against an IS
> which does not have a valid base?

Just FYI, people do this kind of thing all the time. This activity in general
is the cause of a FAQ on the Saxon list, when people try to use
document("someRelativeURI") in a stylesheet that was given as a stream via an
InputSource. Michael Kay always tells people:

   If you build the stylesheet from a SAX InputSource, be sure to
   use setSystemId() even if the actual source is a stream. You
   can set it to any legal URI value, e.g. "file:/" + 
   System.property("user.dir") + "/".

Though he doesn't advise people about the underlying-OS-dependent quirks of
the "file:" scheme. :)

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/





More information about the 4suite mailing list