URIResolver.resolve() parameters convention?
Added by Anonymous over 16 years ago
Legacy ID: #5099047 Legacy Poster: kendall shaw (queshaw)
When using saxon with java, to process XSLT, my URIResolver doesn't always get the "base" parameter set to a path. Is it reasonable to expect that when base has no path, the last time resolve was called with base set to a path that that is still the current base? Do you know if I can expect other JAXP implementations to work the same way?
Replies (2)
RE: URIResolver.resolve() parameters convention? - Added by Anonymous over 16 years ago
Legacy ID: #5102877 Legacy Poster: Ignacio Hernandez-Ros (ignacioh)
This may happen when the input document is a Source object and the systemId of the Source object is not properly initialized. Try using source.setSystemId(...) while building the XML trees.
RE: URIResolver.resolve() parameters conventi - Added by Anonymous over 16 years ago
Legacy ID: #5102912 Legacy Poster: Michael Kay (mhkay)
It's best to ensure that your documents always have a base URI. This is achieved in JAXP using setSystemId(). Saxon tries to keep going even if no system ID is set, but in interfaces like the URIResolver, if there's no base URI then there's no sensible way of setting the base argument. >Is it reasonable to expect that when base has no path, the last time resolve was called with base set to a path that that is still the current base? No, there doesn't seem be any rationale for that expectation. >Do you know if I can expect other JAXP implementations to work the same way? I think it's very likely that JAXP implementations will differ in this kind of detail. The API specs are not very detailed when it comes to edge cases, and there are no compatibility tests. Michael Kay
Please register to reply