/** * Return the base class name of the translet. * The translet name is resolved using the following rules: * 1. if the _transletName attribute is set and its value is not "GregorSamsa", * then _transletName is returned. * 2. otherwise get the translet name from the base name of the system ID * 3. return "GregorSamsa" if the result from step 2 is null. * * @param source The input Source * @return The name of the translet class */ private String getTransletBaseName(Source source) { String transletBaseName = null; if (!_transletName.equals(DEFAULT_TRANSLET_NAME)) return _transletName; else { String systemId = source.getSystemId(); if (systemId != null) { String baseName = Util.baseName(systemId); if (baseName != null) { baseName = Util.noExtName(baseName); transletBaseName = Util.toJavaName(baseName); } } } return (transletBaseName != null) ? transletBaseName : DEFAULT_TRANSLET_NAME; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { // A _uriResolver must be set if this method is called final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } catch (TransformerException e) { // Falls through } return null; }
transletName = Util.baseName(_systemId);
transletName = Util.baseName(_systemId);
/** * Return the base class name of the translet. * The translet name is resolved using the following rules: * 1. if the _transletName attribute is set and its value is not "GregorSamsa", * then _transletName is returned. * 2. otherwise get the translet name from the base name of the system ID * 3. return "GregorSamsa" if the result from step 2 is null. * * @param source The input Source * @return The name of the translet class */ private String getTransletBaseName(Source source) { String transletBaseName = null; if (!_transletName.equals(DEFAULT_TRANSLET_NAME)) return _transletName; else { String systemId = source.getSystemId(); if (systemId != null) { String baseName = Util.baseName(systemId); if (baseName != null) { baseName = Util.noExtName(baseName); transletBaseName = Util.toJavaName(baseName); } } } return (transletBaseName != null) ? transletBaseName : DEFAULT_TRANSLET_NAME; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { if (_uriResolver != null) { final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } } catch (TransformerException e) { // Falls through } return null; }
transletName = Util.baseName(_systemId);
/** * Return the base class name of the translet. * The translet name is resolved using the following rules: * 1. if the _transletName attribute is set and its value is not "GregorSamsa", * then _transletName is returned. * 2. otherwise get the translet name from the base name of the system ID * 3. return "GregorSamsa" if the result from step 2 is null. * * @param source The input Source * @return The name of the translet class */ private String getTransletBaseName(Source source) { String transletBaseName = null; if (!_transletName.equals(DEFAULT_TRANSLET_NAME)) return _transletName; else { String systemId = source.getSystemId(); if (systemId != null) { String baseName = Util.baseName(systemId); if (baseName != null) { baseName = Util.noExtName(baseName); transletBaseName = Util.toJavaName(baseName); } } } return (transletBaseName != null) ? transletBaseName : DEFAULT_TRANSLET_NAME; }
final InputSource input = Util.getInputSource(xsltc, source); byte[][] bytecodes = xsltc.compile(null, input, outputType); final String transletName = xsltc.getClassName();
transletName = Util.baseName(_systemId);
/** * Return the base class name of the translet. * The translet name is resolved using the following rules: * 1. if the _transletName attribute is set and its value is not "GregorSamsa", * then _transletName is returned. * 2. otherwise get the translet name from the base name of the system ID * 3. return "GregorSamsa" if the result from step 2 is null. * * @param source The input Source * @return The name of the translet class */ private String getTransletBaseName(Source source) { String transletBaseName = null; if (!_transletName.equals(DEFAULT_TRANSLET_NAME)) return _transletName; else { String systemId = source.getSystemId(); if (systemId != null) { String baseName = Util.baseName(systemId); if (baseName != null) { baseName = Util.noExtName(baseName); transletBaseName = Util.toJavaName(baseName); } } } return (transletBaseName != null) ? transletBaseName : DEFAULT_TRANSLET_NAME; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { if (_uriResolver != null) { final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } } catch (TransformerException e) { // Falls through } return null; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { if (_uriResolver != null) { final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } } catch (TransformerException e) { // Falls through } return null; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { if (_uriResolver != null) { final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } } catch (TransformerException e) { // Falls through } return null; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { // A _uriResolver must be set if this method is called final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } catch (TransformerException e) { // Falls through } return null; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { // A _uriResolver must be set if this method is called final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } catch (TransformerException e) { // Falls through } return null; }
/** * This method implements XSLTC's SourceLoader interface. It is used to * glue a TrAX URIResolver to the XSLTC compiler's Input and Import classes. * * @param href The URI of the document to load * @param context The URI of the currently loaded document * @param xsltc The compiler that resuests the document * @return An InputSource with the loaded document */ public InputSource loadSource(String href, String context, XSLTC xsltc) { try { // A _uriResolver must be set if this method is called final Source source = _uriResolver.resolve(href, context); if (source != null) { return Util.getInputSource(xsltc, source); } } catch (TransformerException e) { // Falls through } return null; }
final InputSource input = Util.getInputSource(xsltc, source); byte[][] bytecodes = xsltc.compile(null, input, outputType); final String transletName = xsltc.getClassName();
final InputSource input = Util.getInputSource(xsltc, source); byte[][] bytecodes = xsltc.compile(null, input, outputType); final String transletName = xsltc.getClassName();
final InputSource input = Util.getInputSource(xsltc, source); byte[][] bytecodes = xsltc.compile(null, input, outputType); final String transletName = xsltc.getClassName();