/** * Compile a regular expression (or, in some configurations, get a compiled * regular expression from a cache * * @param regex the regular expression as a string * @param flags the value of the flags attribute * @param hostLanguage one of "XSD10", "XSD11", XP20" or "XP30". Also allow combinations, e.g. "XP20/XSD11". * @param warnings if non-null, any warnings from the regular expression compiler will be added to this list. * If null, the warnings are ignored. * @return the compiled regular expression * @throws XPathException if the regular expression or the flags are invalid */ public RegularExpression compileRegularExpression(CharSequence regex, String flags, String hostLanguage, List<String> warnings) throws XPathException { return Version.platform.compileRegularExpression(this, regex, flags, hostLanguage, warnings); }
private void readCollation(Attributes atts) { Properties props = new Properties(); String collationUri = null; for (int i = 0; i < atts.getLength(); i++) { if (atts.getURI(i).isEmpty()) { String name = atts.getLocalName(i); String value = atts.getValue(i); if (value.isEmpty()) { continue; } if ("uri".equals(name)) { collationUri = value; } else { props.put(name, value); } } } if (collationUri == null) { errors.add(new XPathException("collation specified with no uri")); } StringCollator collator = null; try { collator = Version.platform.makeCollation(config, props, collationUri); } catch (XPathException e) { errors.add(e); } config.registerCollation(collationUri, collator); }
/** * Create an GenericAtomicComparer * @param collator the collation to be used. If the method is called at compile time, this should * be a NamedCollation so that it can be cloned at run-time. * @param platform used to obtain collation keys. */ public CollatingAtomicComparer(StringCollator collator, Platform platform) { if (collator == null) { this.collator = CodepointCollator.getInstance(); collationURI = NamespaceConstant.CODEPOINT_COLLATION_URI; } else { this.collator = collator; collationURI = "*unknown*"; } canReturnCollationKeys = platform.canReturnCollationKeys(this.collator); }
protected void init() { //BuiltInListType.init(); platform.initialize(this); if (platform.isDotNet()) { externalObjectModels = new ArrayList(3); } else { synchronized (Configuration.class) { if (sharedExternalObjectModels == null) { registerStandardObjectModels(); } externalObjectModels = new ArrayList(sharedExternalObjectModels); } } //namePool = NamePool.getDefaultNamePool(); namePool = new NamePool(); platform.makeExtensionLibrary(this); // Get the implicit timezone from the current system clock //GregorianCalendar calendar = new GregorianCalendar(); //int tzmsecs = (calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET)); //implicitTimezone = tzmsecs / 60000; }
return Version.platform.makeCollation(config, new Properties(), uri); } else if (uri.startsWith("http://saxon.sf.net/collation?")) { URI uuri; return Version.platform.makeCollation(config, props, uri); } else if (uri.startsWith("http://www.w3.org/2013/collation/UCA")) { StringCollator uca = Version.platform.makeUcaCollator(uri, config); if (uca != null) { return uca; return Version.platform.makeCollation(config, props, uri);
System.err.println(Configuration.getPlatform().getPlatformVersion()); factory.setAttribute(FeatureKeys.TIMING, Boolean.valueOf(true)); showTime = true; } else if (Configuration.getPlatform().isJava()) { styleParser = config.getStyleParser(); styleSource = new SAXSource(styleParser, new InputSource(System.in));
/** * Get a message used to identify this product when a transformation is run using the -t option * * @return A string containing both the product name and the product * version */ public static String getProductTitle() { return getProductName() + '-' + softwareEdition + ' ' + getProductVersion() + (platform.isJava() ? 'J' : 'N') + " from Saxonica"; }
return (AtomicType)Configuration.getPlatform().getExternalObjectType(env.getConfiguration(), uri, parts[1]); } else { if (env.isImportedSchema(uri)) {
System.err.println(Configuration.getPlatform().getPlatformVersion()); config.setTiming(true); showTime = true;
/** * Get a message used to identify this product when a transformation is run using the -t option * @return A string containing both the product name and the product * version * @since 8.4 */ public String getProductTitle() { return "Saxon " + Version.getProductVersion() + platform.getPlatformSuffix() + " from Saxonica"; }
/** * Get a collation key for two Strings. The essential property of collation keys * is that if two values are equal under the collation, then the collation keys are * compare correctly under the equals() method. */ public Object getCollationKey(String s) { return platform.getCollationKey(this, s); }
Source ps = Version.platform.getParserSource( pipe, ss, schemaValidation, dtdValidation, options.getStripSpace()); if (ps == ss) {
protected void init() { Version.platform.initialize(this); defaultXsltCompilerInfo.setURIResolver(getSystemURIResolver()); StandardEntityResolver resolver = new StandardEntityResolver();
System.err.println(config.getProductTitle()); System.err.println(Configuration.getPlatform().getPlatformVersion()); factory.setAttribute(FeatureKeys.TIMING, Boolean.valueOf(true)); } else if (Configuration.getPlatform().isJava()) { styleParser = config.getStyleParser(); styleSource = new SAXSource(styleParser, new InputSource(System.in));
/** * Get a message used to identify this product when a transformation is run using the -t option * * @return A string containing both the product name and the product * version */ public static String getProductTitle() { return getProductName() + '-' + softwareEdition + ' ' + getProductVersion() + (platform.isJava() ? 'J' : 'N') + " from Saxonica"; }
protected void init() { BuiltInListType.init(); platform.initialize(this); if (platform.isDotNet()) { externalObjectModels = Collections.EMPTY_LIST; } else { synchronized (Configuration.class) { if (sharedExternalObjectModels == null) { registerStandardObjectModels(); } externalObjectModels = new ArrayList(sharedExternalObjectModels); } } //namePool = NamePool.getDefaultNamePool(); namePool = new NamePool(); platform.makeExtensionLibrary(this); // Get the implicit timezone from the current system clock //GregorianCalendar calendar = new GregorianCalendar(); //int tzmsecs = (calendar.get(Calendar.ZONE_OFFSET) + calendar.get(Calendar.DST_OFFSET)); //implicitTimezone = tzmsecs / 60000; }
try { if (uri.equals("http://saxon.sf.net/collation")) { return Version.platform.makeCollation(config, new Properties(), uri); } else if (uri.startsWith("http://saxon.sf.net/collation?")) { URI uuri; return Version.platform.makeCollation(config, props, uri); } else if (uri.startsWith("http://www.w3.org/2013/collation/UCA")) { StringCollator uca = Version.platform.makeUcaCollator(uri, config); if (uca != null) { return uca; return Version.platform.makeCollation(config, props, uri);
return (AtomicType)Configuration.getPlatform().getExternalObjectType(env.getConfiguration(), uri, parts[1]); } else { if (env.isImportedSchema(uri)) {
System.err.println(factory.getConfiguration().getProductTitle()); System.err.println(Configuration.getPlatform().getPlatformVersion()); factory.setAttribute( FeatureKeys.TIMING,
/** * Get a message used to identify this product when a transformation is run using the -t option * * @return A string containing both the product name and the product * version * @since 8.4 */ public String getProductTitle() { return "Saxon " + Version.getProductVersion() + platform.getPlatformSuffix() + " from Saxonica"; }