diff --git a/extensions/org.eclipse.lsp4xml.xsl/.gitignore b/extensions/org.eclipse.lsp4xml.xsl/.gitignore
new file mode 100644
index 000000000..700005d0a
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/.gitignore
@@ -0,0 +1,36 @@
+build/
+.out/
+bin/
+.bin/
+target/
+
+/gradle.properties
+/archive/
+/META-INF
+
+.classpath
+.project
+.settings
+
+.idea/
+*.iml
+*.iws
+*.ipr
+.idea_modules/
+**/out/
+
+*.tmp
+*.bak
+*.swp
+*~
+
+.gradle
+
+.DS_Store*
+.AppleDouble
+.LSOverride
+
+.directory
+.Trash*
+
+**/adhoctest/
\ No newline at end of file
diff --git a/extensions/org.eclipse.lsp4xml.xsl/pom.xml b/extensions/org.eclipse.lsp4xml.xsl/pom.xml
new file mode 100644
index 000000000..03de7c579
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/pom.xml
@@ -0,0 +1,57 @@
+
+ 4.0.0
+
+ org.eclipse
+ lsp4xml-extensions
+ 0.0.1-SNAPSHOT
+
+ org.eclipse.lsp4xml.xsl
+
+ UTF-8
+
+
+
+
+ maven-compiler-plugin
+ 3.7.0
+
+
+ 1.8
+
+
+
+
+
+
+ com.google.code.gson
+ gson
+ 2.7
+
+
+ org.eclipse.lsp4j
+ org.eclipse.lsp4j
+ ${lsp4j.version}
+
+
+ org.eclipse.lsp4j
+ org.eclipse.lsp4j.jsonrpc
+ ${lsp4j.version}
+
+
+ org.eclipse.xtext
+ org.eclipse.xtext.xbase.lib
+ 2.14.0
+
+
+ junit
+ junit
+ 4.12
+ test
+
+
+ org.eclipse
+ org.eclipse.lsp4xml
+ 0.0.1-SNAPSHOT
+
+
+
\ No newline at end of file
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/java/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension
new file mode 100644
index 000000000..fb1c87613
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension
@@ -0,0 +1 @@
+org.eclipse.lsp4xml.xsl.XSLPlugin
\ No newline at end of file
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLPlugin.java b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLPlugin.java
new file mode 100644
index 000000000..815fe2cf1
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLPlugin.java
@@ -0,0 +1,29 @@
+package org.eclipse.lsp4xml.xsl;
+
+import org.eclipse.lsp4xml.services.extensions.IXMLExtension;
+import org.eclipse.lsp4xml.services.extensions.XMLExtensionsRegistry;
+import org.eclipse.lsp4xml.uriresolver.URIResolverExtensionManager;
+
+public class XSLPlugin implements IXMLExtension {
+
+ private final XSLURIResolverExtension uiResolver;
+
+ public XSLPlugin() {
+ uiResolver = new XSLURIResolverExtension();
+ }
+
+ @Override
+ public void updateSettings(Object settings) {
+
+ }
+
+ @Override
+ public void start(XMLExtensionsRegistry registry) {
+ URIResolverExtensionManager.getInstance().registerResolver(uiResolver);
+ }
+
+ @Override
+ public void stop(XMLExtensionsRegistry registry) {
+ URIResolverExtensionManager.getInstance().unregisterResolver(uiResolver);
+ }
+}
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLURIResolverExtension.java b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLURIResolverExtension.java
new file mode 100644
index 000000000..355518501
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/org/eclipse/lsp4xml/xsl/XSLURIResolverExtension.java
@@ -0,0 +1,60 @@
+package org.eclipse.lsp4xml.xsl;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Writer;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import org.eclipse.lsp4xml.uriresolver.URIResolverExtension;
+
+public class XSLURIResolverExtension implements URIResolverExtension {
+
+ /**
+ * The XSL namespace URI (= http://www.w3.org/1999/XSL/Transform)
+ */
+ private static final String XSL_NAMESPACE_URI = "http://www.w3.org/1999/XSL/Transform"; //$NON-NLS-1$
+
+ @Override
+ public String resolve(String baseLocation, String publicId, String systemId) {
+ if (!XSL_NAMESPACE_URI.equals(publicId)) {
+ return null;
+ }
+ else {
+
+ }
+ // TODO: extract version from XML Document
+ String version = "1.0";
+ String schemaFileName = "xslt-" + version + ".xsd";
+ String schemaPath = "/xslt-schemas/" + schemaFileName;
+
+ try {
+ Path baseDir = Paths.get("C://lsp4xml");
+ Files.createDirectories(baseDir);
+ Path outFile = baseDir.resolve(schemaFileName);
+ if (!outFile.toFile().exists()) {
+ InputStream in = XSLURIResolverExtension.class.getResourceAsStream(schemaPath);
+ String xml = convertStreamToString(in);
+ saveToFile(xml, outFile);
+ }
+ return outFile.toFile().toURI().toString();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ private static void saveToFile(String xml, Path outFile) throws IOException {
+ try (Writer writer = Files.newBufferedWriter(outFile, StandardCharsets.UTF_8)) {
+ writer.write(xml);
+ }
+ }
+
+ static String convertStreamToString(java.io.InputStream is) {
+ java.util.Scanner s = new java.util.Scanner(is).useDelimiter("\\A");
+ return s.hasNext() ? s.next() : "";
+ }
+
+}
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-1.0.xsd b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-1.0.xsd
new file mode 100644
index 000000000..9da1ba392
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-1.0.xsd
@@ -0,0 +1,1709 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART B: definitions of individual XSLT elements
+ Elements are listed in alphabetical order.
+
+
+
+
+
+
+
+ This command applies template rule from an imported style sheet.
+
+
+
+
+
+
+
+
+
+
+
+
+ Applies template rules based on a given XPath selection criteria. If no template
+ is found the built in templates are used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. Specifies the XPath criteria to be used to apply the templates.
+
+
+
+
+
+
+ Optional. Specifies the type of template to be used if there is more than
+ one way in which to process the given criteria.
+
+
+
+
+
+
+
+
+
+
+
+ Defines an attribute that will be put in the result set.
+
+
+
+
+
+
+
+
+
+ Required. The name of the attribute to be created.
+
+
+
+
+
+
+ Optional. The namespace for the attribute.
+
+
+
+
+
+
+
+
+
+
+
+ Defines a group of attributes that will be created and can be reused
+ by other portions of the stylesheet during processing. These attributes
+ will appear on the resulting document when used.
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. Name of the attribute set.
+
+
+
+
+
+
+ A list of attributes-sets separated by spaces to be used in this
+ attribute set.
+
+
+
+
+
+
+
+
+
+
+
+ Specifies the name of a template to be called. A called template
+ is only executed when it is called. It is not executed directly by
+ an apply-templates command.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The name of the template to be called.
+
+
+
+
+
+
+
+
+
+
+
+ Choose is the beginning of a When/Otherwise combination. It is
+ the way to implement case selection of If/Then/ElseIf type logical
+ processing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates a comment node in the result document.
+
+
+
+
+
+
+
+
+
+
+
+
+ Copy creates a duplicate of the current node being processed. It
+ does not copy the attributes or children nodes. See copy-of for
+ copying attributes and children nodes.
+
+
+
+
+
+
+
+
+ Optional. A space separated list of attributes sets to apply to the
+ result document.
+
+
+
+
+
+
+
+
+
+
+
+ Creates a copy-of the current node and all attributes, and children nodes.
+ It copies the nodes specified by the XPath selection criteria.
+
+
+
+
+
+
+
+
+ Required. XPath expressions that select the nodes to be copied.
+
+
+
+
+
+
+
+
+
+
+
+ Defines the output format to be used when converting numbers into strings when
+ used with the XPath function format-number().
+
+
+
+
+
+
+
+
+
+ Optional. The unique name for this format.
+
+
+
+
+
+
+ Optional. The character to use to represent a decimal point.
+ The default value is a period.
+
+
+
+
+
+
+ Optional. The character to be used to seperate thousands. The
+ default is a comma.
+
+
+
+
+
+
+ Optional. The string to be used to represent infinity. The default
+ is Infinity.
+
+
+
+
+
+
+ Optional. The character to be used to represent negative numbers.
+ The default is the minus sign.
+
+
+
+
+
+
+ Optional. The string to be used when the input is Not a Number.
+ The default is NaN.
+
+
+
+
+
+
+ Optional. The character to be used to represent a percent.
+ The default is a percent sign.
+
+
+
+
+
+
+ Optional. The character to be used to represet per thousand.
+ The default is ‰
+
+
+
+
+
+
+ Optional. The character to be used to represent the digit zero.
+ The default is the number zero.
+
+
+
+
+
+
+ Optional. The character to be used to indicated where a digit
+ is required. The default values is # character.
+
+
+
+
+
+
+ Optional. The character to be used to separate positive and
+ negative sub-patterns in a pattern. The default is a semi-colon.
+
+
+
+
+
+
+
+
+
+
+
+ Creates an element in the result document.
+
+
+
+
+
+
+
+
+ Required. The name of the element to be created.
+
+
+
+
+
+
+ Optional. The namespace the element belongs.
+
+
+
+
+
+
+ Optional. A space separated list of attribute-set names to
+ be included on the element.
+
+
+
+
+
+
+
+
+
+
+
+ Specifies alternate code to be run if the XSLT processor doesn't understand
+ a particular xsl element.
+
+
+
+
+
+
+
+ A looping command that processes each node returned from the
+ XPath selection criteria.
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The XPath selection criteria to be used to retrieve the
+ node set to be processed by the loop.
+
+
+
+
+
+
+
+
+
+
+
+ A logical construct, that will only be applied when the XPath expression
+ test returns true. It does not support a Else statement, see Choose
+ for implementing If/Then/ElseIf logic.
+
+
+
+
+
+
+
+
+ Required. The XPath expression to test the variable or node against.
+ The statements nested will only be executed if the test returns
+ true.
+
+
+
+
+
+
+
+
+
+
+
+ Allows the inclusion of one stylesheet into another. If there are
+ templates that are the same in the parent stylesheet that are in the
+ stylesheet being imported, the parent stylesheet's templates will
+ take precedence.
+
+
+
+
+
+
+
+
+ Required. The URI for the stylesheet. This is either a relative
+ or physical URI. If it is relative, it is relative to the location
+ of the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+
+ Include brings in another stylesheet into the current one. Unlike
+ the Import statement, the stylesheet templates have the same precedence
+ as the one being included in to.
+
+
+
+
+
+
+
+
+ Required. The URI for the stylesheet. This is either a relative
+ or physical URI. If it is relative, it is relative to the location
+ of the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+ A key is a way to index a set of nodes to be retrieved later by the XPath
+ key() function. It allows faster access to a series of nodes based off of a
+ unique key with in a list of nodes.
+
+
+
+
+
+
+
+
+
+ Required. The name of the key to be created.
+
+
+
+
+
+
+ Optional. Defines the XPath expression to which the nodes will
+ be applied.
+
+
+
+
+
+
+ Required. The value of the key for each of the nodes.
+
+
+
+
+
+
+
+
+
+
+
+
+ Writes a message to the output, usually stdout or stderro. Typically
+ used to report errors during processing.
+
+
+
+
+
+
+
+
+ Optional. Indicates whether processing should be ended after
+ producing the message. The default value is no.
+
+
+
+
+
+
+
+
+
+
+
+ Allows replacing of a particular namespace from the style sheet to a different
+ namespace when writing the result document.
+
+
+
+
+
+
+
+
+
+ Required. Specifies the name of the prefix you want to change.
+
+
+
+
+
+
+ Required. Specifies the name of the prefix the result is to use.
+
+
+
+
+
+
+
+
+
+
+
+ Used to determine the integer position of the current node. Also used
+ in formatting a number.
+
+
+
+
+
+
+
+
+
+ Optional. A number provided by the implementor instead of
+ a system generated number. The position() xpath function can
+ be used as well.
+
+
+
+
+
+
+ Optional. Specifies how the sequence number is assigned. Valid values
+ are single (default), multiple, and any.
+
+
+
+
+
+
+ Optional. An XPath expression that indicates what nodes are to be
+ counted.
+
+
+
+
+
+
+ Optional. An XPath expression that indicates where counting will start.
+
+
+
+
+
+
+ Optional. The format string in which the number is to be formatted.
+
+
+
+
+
+
+ Optional. The language code used to indicate what spoken language is
+ to be used for the format string.
+
+
+
+
+
+
+ Optional. Specifies whether the number is alphabetical or traditional.
+
+
+
+
+
+
+ Optional. The character to be used to seperate a group of numbers.
+
+
+
+
+
+
+ Optional. A number indicating the number of digits in a group. The
+ default is 3.
+
+
+
+
+
+
+
+
+
+
+
+ Otherwise is used to indicate the default action when none of the
+ When tests are true, in a Choose statement.
+
+
+
+
+
+
+
+ Specifies the format for the result document.
+
+
+
+
+
+
+
+
+ Optional. Valid values are xml, html, and text.
+
+
+
+
+
+
+ Optional. A space separated list of elements whose content should
+ be wrapped with CDATA.
+
+
+
+
+
+
+ Optional. Sets the value of the Public doctype attribute.
+
+
+
+
+
+
+ Optional. Sets the value of the System doctype attribute.
+
+
+
+
+
+
+ Optional. Specifies the type of encoding to use. i.e. UTF-8, UTF-16, etc.
+
+
+
+
+
+
+ Optional. Should the result document be pretty-printed.
+
+
+
+
+
+
+ Optional. The mime type of the result document. i.e. text/xml
+
+
+
+
+
+
+ Optional. Whether the xml declation should be created in the
+ result document.
+
+
+
+
+
+
+ Optional. Indicates if a standalone declartion should occcur in the
+ result document.
+
+
+
+
+
+
+ Optional. Sets the W3C version number to be used with the
+ result document. Only used for HTML or XML output.
+
+
+
+
+
+
+
+
+
+
+
+ Used to declare a local or global parameter.
+
+
+
+
+
+
+
+
+ Required. The name of the parameter to be created.
+
+
+
+
+
+
+ Optional. An XPath expression to be used to populate the parameter
+ if nothing is passed to it.
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates the elements that are to have white space preserved when
+ creating the result document.
+
+
+
+
+
+
+
+
+ Optional. A space seperated list of elements in which
+ white space is significant and should be preserved when
+ creating the result document.
+
+
+
+
+
+
+
+
+
+
+
+ Creates a processing instruction in the result document.
+
+
+
+
+
+
+
+
+ Required. The name of the processing instruction to be created.
+
+
+
+
+
+
+
+
+
+
+
+ Sorts the output of the node set.
+
+
+
+
+
+
+
+
+
+ Optional. Specifies the XPath expression to be used to create the nodeset
+ to be sorted.
+
+
+
+
+
+
+ Optional. The language code to be used for sorting.
+
+
+
+
+
+
+ Optional. The type of data that is being sorted. The default
+ is text.
+
+
+
+
+
+
+ Optional. The order in which the data is to be sorted. The
+ default is ascending.
+
+
+
+
+
+
+ Optional. Specifies if upper or lowercase letters are to
+ be sorted first.
+
+
+
+
+
+
+
+
+
+
+
+ Defines which elements are to have white space stripped when
+ writing the result document.
+
+
+
+
+
+
+
+
+ Required. A space separeated list of elements are to have
+ white space removed when writing the result document.
+
+
+
+
+
+
+
+
+
+
+
+ The root element of a style sheet. Also see the transform element.
+ Either stylesheet or transform can be used. Typically stylsheet is
+ used.
+
+
+
+
+
+
+
+ A template contains processing instructions and commands for nodes in the
+ input document that match the specified XPath expression.
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. An XPath expression or expressions that this template will
+ be applied to. Note if this is omitted, then a name attribute must
+ be used. Either a namoe or a match are to be used, but not both.
+
+
+
+
+
+
+ Optional. Indicates the numeric priortity for processing the
+ template.
+
+
+
+
+
+
+ Optional. The name of the mode for this template. Used to match
+ up with the apply-templates mode attribute.
+
+
+
+
+
+
+ Optional. The name of a called template. Note that if name is
+ not used, then match must be used. You can have one or the other
+ but not both.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Writes text data to the output. i.e. #PCData
+
+
+
+
+
+
+
+
+ Optional. Indicates if non friendly html and xml content should be converted
+ to their entity types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The version number corresponding the the
+ XSLT specification being used. For XSLT 1.0, this will
+ be 1.0.
+
+
+
+
+
+
+ Optional. A list of namespace prefixes to exclude from the result document. #default excludes the default namespace.
+
+
+
+
+
+
+ Optional. A list of extension namespace prefixes. This is used to identify namespaces that
+ contain XSLT processor extensions. #default can be used to specify the default namespace.
+
+
+
+
+
+
+
+
+
+
+
+ The root element of a style sheet. Also see the stylesheet element.
+ Either stylesheet or transform can be used. Typically stylsheet is
+ used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. A unique ID for the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+ Used to pull the data value from the selected node or XPath expression.
+
+
+
+
+
+
+
+
+
+ Required. The XPath expression or current node to be used
+ to pull the data from.
+
+
+
+
+
+
+ Optional. Whether non-xml friendly data should be entity escaped.
+
+
+
+
+
+
+
+
+
+
+
+ Declares a local or global variable to be used during processing.
+ The contents of variable can be populated by either a series of
+ XSLT commands or XPath expressions.
+
+
+
+
+
+
+
+
+
+ Required. The name of the variable. This is how the
+ variable is accessed later in the stylesheet.
+
+
+
+
+
+
+ Optional. The XPath expression in which the variable is
+ populated from. This specifies where the variable is to get
+ it's data value from.
+
+
+
+
+
+
+
+
+
+
+
+ A conditional statement similiar to an if statement, used to test
+ if a particular expression is true or false. Use with the Choose and
+ Other wise elements.
+
+
+
+
+
+
+
+
+
+ An XPath expression that tests to true or false. If true
+ the statements within are executed.
+
+
+
+
+
+
+
+
+
+
+
+ Defines the value of a parameter to be passed to a called template.
+
+
+
+
+
+
+
+
+
+ Required. The name of the parameter to be set. This
+ must exist in the template that is being called.
+
+
+
+
+
+
+ Optional. An XPath expression that is used to set
+ the value for the parameter being passed to a template.
+
+
+
+
+
+
+
+
+
+
+
+ PART C: definition of literal result elements
+
+ There are three ways to define the literal result elements
+ permissible in a stylesheet.
+
+ (a) do nothing. This allows any element to be used as a literal
+ result element, provided it is not in the XSLT namespace
+
+ (b) declare all permitted literal result elements as members
+ of the xsl:literal-result-element substitution group
+
+ (c) redefine the model group xsl:result-elements to accommodate
+ all permitted literal result elements.
+
+ Literal result elements are allowed to take certain attributes
+ in the XSLT namespace. These are defined in the attribute group
+ literal-result-element-attributes, which can be included in the
+ definition of any literal result element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART D: definitions of simple types used in stylesheet attributes
+
+
+
+
+
+
+
+ This type is used for all attributes that allow an attribute value template.
+ The general rules for the syntax of attribute value templates, and the specific
+ rules for each such attribute, are described in the XSLT 2.0 Recommendation.
+
+
+
+
+
+
+
+
+
+ A string containing exactly one character.
+
+
+
+
+
+
+
+
+
+
+
+ An XPath 2.0 expression.
+
+
+
+
+
+
+
+
+
+
+
+ Describes how type annotations in source documents are handled.
+
+
+
+
+
+
+
+
+
+
+
+
+ The level attribute of xsl:number:
+ one of single, multiple, or any.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:apply-templates:
+ either a QName, or #current, or #default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:template:
+ either a list, each member being either a QName or #default;
+ or the value #all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of NameTests, as defined in the XPath 2.0 Recommendation.
+ Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method attribute of xsl:output:
+ Either one of the recognized names "xml", "xhtml", "html", "text",
+ or a QName that must include a prefix.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A match pattern as defined in the XSLT 2.0 Recommendation.
+ The syntax for patterns is a restricted form of the syntax for
+ XPath 2.0 expressions.
+
+
+
+
+
+
+
+
+
+ Either a namespace prefix, or #default.
+ Used in the xsl:namespace-alias element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of QNames.
+ Used in the [xsl:]use-attribute-sets attribute of various elements,
+ and in the cdata-section-elements attribute of xsl:output
+
+
+
+
+
+
+
+
+
+ A QName.
+ This schema does not use the built-in type xs:QName, but rather defines its own
+ QName type. Although xs:QName would define the correct validation on these attributes,
+ a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
+ because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
+ the default namespace, which is not the correct assumption for XSLT.
+ The data type is defined as a restriction of the built-in type Name, restricted
+ so that it can only contain one colon which must not be the first or last character.
+
+
+
+
+
+
+
+
+
+
+
+ The description of a data type, conforming to the
+ SequenceType production defined in the XPath 2.0 Recommendation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no".
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no" or "omit".
+
+
+
+
+
+
+
+
+
+
+
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-2.0.xsd b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-2.0.xsd
new file mode 100644
index 000000000..3f573cb3b
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/java/xslt-schemas/xslt-2.0.xsd
@@ -0,0 +1,1173 @@
+
+
+
+
+
+
+
+
+ This is a schema for XSLT 2.0 stylesheets.
+
+ It defines all the elements that appear in the XSLT namespace; it also
+ provides hooks that allow the inclusion of user-defined literal result elements,
+ extension instructions, and top-level data elements.
+
+ The schema is derived (with kind permission) from a schema for XSLT 1.0 stylesheets
+ produced by Asir S Vedamuthu of WebMethods Inc.
+
+ This schema is available for use under the conditions of the W3C Software License
+ published at http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+ The schema is organized as follows:
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+ PART B: definitions of individual XSLT elements
+ PART C: definitions for literal result elements
+ PART D: definitions of simple types used in attribute definitions
+
+ This schema does not attempt to define all the constraints that apply to a valid
+ XSLT 2.0 stylesheet module. It is the intention that all valid stylesheet modules
+ should conform to this schema; however, the schema is non-normative and in the event
+ of any conflict, the text of the Recommendation takes precedence.
+
+ This schema does not implement the special rules that apply when a stylesheet
+ has sections that use forwards-compatible-mode. In this mode, setting version="3.0"
+ allows elements from the XSLT namespace to be used that are not defined in XSLT 2.0.
+
+ Simplified stylesheets (those with a literal result element as the outermost element)
+ will validate against this schema only if validation starts in lax mode.
+
+ This version is dated 2005-02-11
+ Authors: Michael H Kay, Saxonica Limited
+ Jeni Tennison, Jeni Tennison Consulting Ltd.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART B: definitions of individual XSLT elements
+ Elements are listed in alphabetical order.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART C: definition of literal result elements
+
+ There are three ways to define the literal result elements
+ permissible in a stylesheet.
+
+ (a) do nothing. This allows any element to be used as a literal
+ result element, provided it is not in the XSLT namespace
+
+ (b) declare all permitted literal result elements as members
+ of the xsl:literal-result-element substitution group
+
+ (c) redefine the model group xsl:result-elements to accommodate
+ all permitted literal result elements.
+
+ Literal result elements are allowed to take certain attributes
+ in the XSLT namespace. These are defined in the attribute group
+ literal-result-element-attributes, which can be included in the
+ definition of any literal result element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART D: definitions of simple types used in stylesheet attributes
+
+
+
+
+
+
+
+ This type is used for all attributes that allow an attribute value template.
+ The general rules for the syntax of attribute value templates, and the specific
+ rules for each such attribute, are described in the XSLT 2.0 Recommendation.
+
+
+
+
+
+
+
+
+ A string containing exactly one character.
+
+
+
+
+
+
+
+
+
+
+ An XPath 2.0 expression.
+
+
+
+
+
+
+
+
+
+
+ Describes how type annotations in source documents are handled.
+
+
+
+
+
+
+
+
+
+
+
+
+ The level attribute of xsl:number:
+ one of single, multiple, or any.
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:apply-templates:
+ either a QName, or #current, or #default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:template:
+ either a list, each member being either a QName or #default;
+ or the value #all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of NameTests, as defined in the XPath 2.0 Recommendation.
+ Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method attribute of xsl:output:
+ Either one of the recognized names "xml", "xhtml", "html", "text",
+ or a QName that must include a prefix.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A match pattern as defined in the XSLT 2.0 Recommendation.
+ The syntax for patterns is a restricted form of the syntax for
+ XPath 2.0 expressions.
+
+
+
+
+
+
+
+
+ Either a namespace prefix, or #default.
+ Used in the xsl:namespace-alias element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of QNames.
+ Used in the [xsl:]use-attribute-sets attribute of various elements,
+ and in the cdata-section-elements attribute of xsl:output
+
+
+
+
+
+
+
+
+ A QName.
+ This schema does not use the built-in type xs:QName, but rather defines its own
+ QName type. Although xs:QName would define the correct validation on these attributes,
+ a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
+ because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
+ the default namespace, which is not the correct assumption for XSLT.
+ The data type is defined as a restriction of the built-in type Name, restricted
+ so that it can only contain one colon which must not be the first or last character.
+
+
+
+
+
+
+
+
+
+
+ The description of a data type, conforming to the
+ SequenceType production defined in the XPath 2.0 Recommendation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no".
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no" or "omit".
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension
new file mode 100644
index 000000000..fb1c87613
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/META-INF/services/org.eclipse.lsp4xml.services.extensions.IXMLExtension
@@ -0,0 +1 @@
+org.eclipse.lsp4xml.xsl.XSLPlugin
\ No newline at end of file
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-1.0.xsd b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-1.0.xsd
new file mode 100644
index 000000000..9da1ba392
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-1.0.xsd
@@ -0,0 +1,1709 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART B: definitions of individual XSLT elements
+ Elements are listed in alphabetical order.
+
+
+
+
+
+
+
+ This command applies template rule from an imported style sheet.
+
+
+
+
+
+
+
+
+
+
+
+
+ Applies template rules based on a given XPath selection criteria. If no template
+ is found the built in templates are used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. Specifies the XPath criteria to be used to apply the templates.
+
+
+
+
+
+
+ Optional. Specifies the type of template to be used if there is more than
+ one way in which to process the given criteria.
+
+
+
+
+
+
+
+
+
+
+
+ Defines an attribute that will be put in the result set.
+
+
+
+
+
+
+
+
+
+ Required. The name of the attribute to be created.
+
+
+
+
+
+
+ Optional. The namespace for the attribute.
+
+
+
+
+
+
+
+
+
+
+
+ Defines a group of attributes that will be created and can be reused
+ by other portions of the stylesheet during processing. These attributes
+ will appear on the resulting document when used.
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. Name of the attribute set.
+
+
+
+
+
+
+ A list of attributes-sets separated by spaces to be used in this
+ attribute set.
+
+
+
+
+
+
+
+
+
+
+
+ Specifies the name of a template to be called. A called template
+ is only executed when it is called. It is not executed directly by
+ an apply-templates command.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The name of the template to be called.
+
+
+
+
+
+
+
+
+
+
+
+ Choose is the beginning of a When/Otherwise combination. It is
+ the way to implement case selection of If/Then/ElseIf type logical
+ processing.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Creates a comment node in the result document.
+
+
+
+
+
+
+
+
+
+
+
+
+ Copy creates a duplicate of the current node being processed. It
+ does not copy the attributes or children nodes. See copy-of for
+ copying attributes and children nodes.
+
+
+
+
+
+
+
+
+ Optional. A space separated list of attributes sets to apply to the
+ result document.
+
+
+
+
+
+
+
+
+
+
+
+ Creates a copy-of the current node and all attributes, and children nodes.
+ It copies the nodes specified by the XPath selection criteria.
+
+
+
+
+
+
+
+
+ Required. XPath expressions that select the nodes to be copied.
+
+
+
+
+
+
+
+
+
+
+
+ Defines the output format to be used when converting numbers into strings when
+ used with the XPath function format-number().
+
+
+
+
+
+
+
+
+
+ Optional. The unique name for this format.
+
+
+
+
+
+
+ Optional. The character to use to represent a decimal point.
+ The default value is a period.
+
+
+
+
+
+
+ Optional. The character to be used to seperate thousands. The
+ default is a comma.
+
+
+
+
+
+
+ Optional. The string to be used to represent infinity. The default
+ is Infinity.
+
+
+
+
+
+
+ Optional. The character to be used to represent negative numbers.
+ The default is the minus sign.
+
+
+
+
+
+
+ Optional. The string to be used when the input is Not a Number.
+ The default is NaN.
+
+
+
+
+
+
+ Optional. The character to be used to represent a percent.
+ The default is a percent sign.
+
+
+
+
+
+
+ Optional. The character to be used to represet per thousand.
+ The default is ‰
+
+
+
+
+
+
+ Optional. The character to be used to represent the digit zero.
+ The default is the number zero.
+
+
+
+
+
+
+ Optional. The character to be used to indicated where a digit
+ is required. The default values is # character.
+
+
+
+
+
+
+ Optional. The character to be used to separate positive and
+ negative sub-patterns in a pattern. The default is a semi-colon.
+
+
+
+
+
+
+
+
+
+
+
+ Creates an element in the result document.
+
+
+
+
+
+
+
+
+ Required. The name of the element to be created.
+
+
+
+
+
+
+ Optional. The namespace the element belongs.
+
+
+
+
+
+
+ Optional. A space separated list of attribute-set names to
+ be included on the element.
+
+
+
+
+
+
+
+
+
+
+
+ Specifies alternate code to be run if the XSLT processor doesn't understand
+ a particular xsl element.
+
+
+
+
+
+
+
+ A looping command that processes each node returned from the
+ XPath selection criteria.
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The XPath selection criteria to be used to retrieve the
+ node set to be processed by the loop.
+
+
+
+
+
+
+
+
+
+
+
+ A logical construct, that will only be applied when the XPath expression
+ test returns true. It does not support a Else statement, see Choose
+ for implementing If/Then/ElseIf logic.
+
+
+
+
+
+
+
+
+ Required. The XPath expression to test the variable or node against.
+ The statements nested will only be executed if the test returns
+ true.
+
+
+
+
+
+
+
+
+
+
+
+ Allows the inclusion of one stylesheet into another. If there are
+ templates that are the same in the parent stylesheet that are in the
+ stylesheet being imported, the parent stylesheet's templates will
+ take precedence.
+
+
+
+
+
+
+
+
+ Required. The URI for the stylesheet. This is either a relative
+ or physical URI. If it is relative, it is relative to the location
+ of the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+
+ Include brings in another stylesheet into the current one. Unlike
+ the Import statement, the stylesheet templates have the same precedence
+ as the one being included in to.
+
+
+
+
+
+
+
+
+ Required. The URI for the stylesheet. This is either a relative
+ or physical URI. If it is relative, it is relative to the location
+ of the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+ A key is a way to index a set of nodes to be retrieved later by the XPath
+ key() function. It allows faster access to a series of nodes based off of a
+ unique key with in a list of nodes.
+
+
+
+
+
+
+
+
+
+ Required. The name of the key to be created.
+
+
+
+
+
+
+ Optional. Defines the XPath expression to which the nodes will
+ be applied.
+
+
+
+
+
+
+ Required. The value of the key for each of the nodes.
+
+
+
+
+
+
+
+
+
+
+
+
+ Writes a message to the output, usually stdout or stderro. Typically
+ used to report errors during processing.
+
+
+
+
+
+
+
+
+ Optional. Indicates whether processing should be ended after
+ producing the message. The default value is no.
+
+
+
+
+
+
+
+
+
+
+
+ Allows replacing of a particular namespace from the style sheet to a different
+ namespace when writing the result document.
+
+
+
+
+
+
+
+
+
+ Required. Specifies the name of the prefix you want to change.
+
+
+
+
+
+
+ Required. Specifies the name of the prefix the result is to use.
+
+
+
+
+
+
+
+
+
+
+
+ Used to determine the integer position of the current node. Also used
+ in formatting a number.
+
+
+
+
+
+
+
+
+
+ Optional. A number provided by the implementor instead of
+ a system generated number. The position() xpath function can
+ be used as well.
+
+
+
+
+
+
+ Optional. Specifies how the sequence number is assigned. Valid values
+ are single (default), multiple, and any.
+
+
+
+
+
+
+ Optional. An XPath expression that indicates what nodes are to be
+ counted.
+
+
+
+
+
+
+ Optional. An XPath expression that indicates where counting will start.
+
+
+
+
+
+
+ Optional. The format string in which the number is to be formatted.
+
+
+
+
+
+
+ Optional. The language code used to indicate what spoken language is
+ to be used for the format string.
+
+
+
+
+
+
+ Optional. Specifies whether the number is alphabetical or traditional.
+
+
+
+
+
+
+ Optional. The character to be used to seperate a group of numbers.
+
+
+
+
+
+
+ Optional. A number indicating the number of digits in a group. The
+ default is 3.
+
+
+
+
+
+
+
+
+
+
+
+ Otherwise is used to indicate the default action when none of the
+ When tests are true, in a Choose statement.
+
+
+
+
+
+
+
+ Specifies the format for the result document.
+
+
+
+
+
+
+
+
+ Optional. Valid values are xml, html, and text.
+
+
+
+
+
+
+ Optional. A space separated list of elements whose content should
+ be wrapped with CDATA.
+
+
+
+
+
+
+ Optional. Sets the value of the Public doctype attribute.
+
+
+
+
+
+
+ Optional. Sets the value of the System doctype attribute.
+
+
+
+
+
+
+ Optional. Specifies the type of encoding to use. i.e. UTF-8, UTF-16, etc.
+
+
+
+
+
+
+ Optional. Should the result document be pretty-printed.
+
+
+
+
+
+
+ Optional. The mime type of the result document. i.e. text/xml
+
+
+
+
+
+
+ Optional. Whether the xml declation should be created in the
+ result document.
+
+
+
+
+
+
+ Optional. Indicates if a standalone declartion should occcur in the
+ result document.
+
+
+
+
+
+
+ Optional. Sets the W3C version number to be used with the
+ result document. Only used for HTML or XML output.
+
+
+
+
+
+
+
+
+
+
+
+ Used to declare a local or global parameter.
+
+
+
+
+
+
+
+
+ Required. The name of the parameter to be created.
+
+
+
+
+
+
+ Optional. An XPath expression to be used to populate the parameter
+ if nothing is passed to it.
+
+
+
+
+
+
+
+
+
+
+
+
+ Indicates the elements that are to have white space preserved when
+ creating the result document.
+
+
+
+
+
+
+
+
+ Optional. A space seperated list of elements in which
+ white space is significant and should be preserved when
+ creating the result document.
+
+
+
+
+
+
+
+
+
+
+
+ Creates a processing instruction in the result document.
+
+
+
+
+
+
+
+
+ Required. The name of the processing instruction to be created.
+
+
+
+
+
+
+
+
+
+
+
+ Sorts the output of the node set.
+
+
+
+
+
+
+
+
+
+ Optional. Specifies the XPath expression to be used to create the nodeset
+ to be sorted.
+
+
+
+
+
+
+ Optional. The language code to be used for sorting.
+
+
+
+
+
+
+ Optional. The type of data that is being sorted. The default
+ is text.
+
+
+
+
+
+
+ Optional. The order in which the data is to be sorted. The
+ default is ascending.
+
+
+
+
+
+
+ Optional. Specifies if upper or lowercase letters are to
+ be sorted first.
+
+
+
+
+
+
+
+
+
+
+
+ Defines which elements are to have white space stripped when
+ writing the result document.
+
+
+
+
+
+
+
+
+ Required. A space separeated list of elements are to have
+ white space removed when writing the result document.
+
+
+
+
+
+
+
+
+
+
+
+ The root element of a style sheet. Also see the transform element.
+ Either stylesheet or transform can be used. Typically stylsheet is
+ used.
+
+
+
+
+
+
+
+ A template contains processing instructions and commands for nodes in the
+ input document that match the specified XPath expression.
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. An XPath expression or expressions that this template will
+ be applied to. Note if this is omitted, then a name attribute must
+ be used. Either a namoe or a match are to be used, but not both.
+
+
+
+
+
+
+ Optional. Indicates the numeric priortity for processing the
+ template.
+
+
+
+
+
+
+ Optional. The name of the mode for this template. Used to match
+ up with the apply-templates mode attribute.
+
+
+
+
+
+
+ Optional. The name of a called template. Note that if name is
+ not used, then match must be used. You can have one or the other
+ but not both.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Writes text data to the output. i.e. #PCData
+
+
+
+
+
+
+
+
+ Optional. Indicates if non friendly html and xml content should be converted
+ to their entity types.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Required. The version number corresponding the the
+ XSLT specification being used. For XSLT 1.0, this will
+ be 1.0.
+
+
+
+
+
+
+ Optional. A list of namespace prefixes to exclude from the result document. #default excludes the default namespace.
+
+
+
+
+
+
+ Optional. A list of extension namespace prefixes. This is used to identify namespaces that
+ contain XSLT processor extensions. #default can be used to specify the default namespace.
+
+
+
+
+
+
+
+
+
+
+
+ The root element of a style sheet. Also see the stylesheet element.
+ Either stylesheet or transform can be used. Typically stylsheet is
+ used.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Optional. A unique ID for the stylesheet.
+
+
+
+
+
+
+
+
+
+
+
+ Used to pull the data value from the selected node or XPath expression.
+
+
+
+
+
+
+
+
+
+ Required. The XPath expression or current node to be used
+ to pull the data from.
+
+
+
+
+
+
+ Optional. Whether non-xml friendly data should be entity escaped.
+
+
+
+
+
+
+
+
+
+
+
+ Declares a local or global variable to be used during processing.
+ The contents of variable can be populated by either a series of
+ XSLT commands or XPath expressions.
+
+
+
+
+
+
+
+
+
+ Required. The name of the variable. This is how the
+ variable is accessed later in the stylesheet.
+
+
+
+
+
+
+ Optional. The XPath expression in which the variable is
+ populated from. This specifies where the variable is to get
+ it's data value from.
+
+
+
+
+
+
+
+
+
+
+
+ A conditional statement similiar to an if statement, used to test
+ if a particular expression is true or false. Use with the Choose and
+ Other wise elements.
+
+
+
+
+
+
+
+
+
+ An XPath expression that tests to true or false. If true
+ the statements within are executed.
+
+
+
+
+
+
+
+
+
+
+
+ Defines the value of a parameter to be passed to a called template.
+
+
+
+
+
+
+
+
+
+ Required. The name of the parameter to be set. This
+ must exist in the template that is being called.
+
+
+
+
+
+
+ Optional. An XPath expression that is used to set
+ the value for the parameter being passed to a template.
+
+
+
+
+
+
+
+
+
+
+
+ PART C: definition of literal result elements
+
+ There are three ways to define the literal result elements
+ permissible in a stylesheet.
+
+ (a) do nothing. This allows any element to be used as a literal
+ result element, provided it is not in the XSLT namespace
+
+ (b) declare all permitted literal result elements as members
+ of the xsl:literal-result-element substitution group
+
+ (c) redefine the model group xsl:result-elements to accommodate
+ all permitted literal result elements.
+
+ Literal result elements are allowed to take certain attributes
+ in the XSLT namespace. These are defined in the attribute group
+ literal-result-element-attributes, which can be included in the
+ definition of any literal result element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART D: definitions of simple types used in stylesheet attributes
+
+
+
+
+
+
+
+ This type is used for all attributes that allow an attribute value template.
+ The general rules for the syntax of attribute value templates, and the specific
+ rules for each such attribute, are described in the XSLT 2.0 Recommendation.
+
+
+
+
+
+
+
+
+
+ A string containing exactly one character.
+
+
+
+
+
+
+
+
+
+
+
+ An XPath 2.0 expression.
+
+
+
+
+
+
+
+
+
+
+
+ Describes how type annotations in source documents are handled.
+
+
+
+
+
+
+
+
+
+
+
+
+ The level attribute of xsl:number:
+ one of single, multiple, or any.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:apply-templates:
+ either a QName, or #current, or #default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:template:
+ either a list, each member being either a QName or #default;
+ or the value #all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of NameTests, as defined in the XPath 2.0 Recommendation.
+ Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method attribute of xsl:output:
+ Either one of the recognized names "xml", "xhtml", "html", "text",
+ or a QName that must include a prefix.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A match pattern as defined in the XSLT 2.0 Recommendation.
+ The syntax for patterns is a restricted form of the syntax for
+ XPath 2.0 expressions.
+
+
+
+
+
+
+
+
+
+ Either a namespace prefix, or #default.
+ Used in the xsl:namespace-alias element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of QNames.
+ Used in the [xsl:]use-attribute-sets attribute of various elements,
+ and in the cdata-section-elements attribute of xsl:output
+
+
+
+
+
+
+
+
+
+ A QName.
+ This schema does not use the built-in type xs:QName, but rather defines its own
+ QName type. Although xs:QName would define the correct validation on these attributes,
+ a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
+ because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
+ the default namespace, which is not the correct assumption for XSLT.
+ The data type is defined as a restriction of the built-in type Name, restricted
+ so that it can only contain one colon which must not be the first or last character.
+
+
+
+
+
+
+
+
+
+
+
+ The description of a data type, conforming to the
+ SequenceType production defined in the XPath 2.0 Recommendation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no".
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no" or "omit".
+
+
+
+
+
+
+
+
+
+
+
diff --git a/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-2.0.xsd b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-2.0.xsd
new file mode 100644
index 000000000..3f573cb3b
--- /dev/null
+++ b/extensions/org.eclipse.lsp4xml.xsl/src/main/resources/xslt-schemas/xslt-2.0.xsd
@@ -0,0 +1,1173 @@
+
+
+
+
+
+
+
+
+ This is a schema for XSLT 2.0 stylesheets.
+
+ It defines all the elements that appear in the XSLT namespace; it also
+ provides hooks that allow the inclusion of user-defined literal result elements,
+ extension instructions, and top-level data elements.
+
+ The schema is derived (with kind permission) from a schema for XSLT 1.0 stylesheets
+ produced by Asir S Vedamuthu of WebMethods Inc.
+
+ This schema is available for use under the conditions of the W3C Software License
+ published at http://www.w3.org/Consortium/Legal/copyright-software-19980720
+
+ The schema is organized as follows:
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+ PART B: definitions of individual XSLT elements
+ PART C: definitions for literal result elements
+ PART D: definitions of simple types used in attribute definitions
+
+ This schema does not attempt to define all the constraints that apply to a valid
+ XSLT 2.0 stylesheet module. It is the intention that all valid stylesheet modules
+ should conform to this schema; however, the schema is non-normative and in the event
+ of any conflict, the text of the Recommendation takes precedence.
+
+ This schema does not implement the special rules that apply when a stylesheet
+ has sections that use forwards-compatible-mode. In this mode, setting version="3.0"
+ allows elements from the XSLT namespace to be used that are not defined in XSLT 2.0.
+
+ Simplified stylesheets (those with a literal result element as the outermost element)
+ will validate against this schema only if validation starts in lax mode.
+
+ This version is dated 2005-02-11
+ Authors: Michael H Kay, Saxonica Limited
+ Jeni Tennison, Jeni Tennison Consulting Ltd.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART A: definitions of complex types and model groups used as the basis
+ for element definitions
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART B: definitions of individual XSLT elements
+ Elements are listed in alphabetical order.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART C: definition of literal result elements
+
+ There are three ways to define the literal result elements
+ permissible in a stylesheet.
+
+ (a) do nothing. This allows any element to be used as a literal
+ result element, provided it is not in the XSLT namespace
+
+ (b) declare all permitted literal result elements as members
+ of the xsl:literal-result-element substitution group
+
+ (c) redefine the model group xsl:result-elements to accommodate
+ all permitted literal result elements.
+
+ Literal result elements are allowed to take certain attributes
+ in the XSLT namespace. These are defined in the attribute group
+ literal-result-element-attributes, which can be included in the
+ definition of any literal result element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PART D: definitions of simple types used in stylesheet attributes
+
+
+
+
+
+
+
+ This type is used for all attributes that allow an attribute value template.
+ The general rules for the syntax of attribute value templates, and the specific
+ rules for each such attribute, are described in the XSLT 2.0 Recommendation.
+
+
+
+
+
+
+
+
+ A string containing exactly one character.
+
+
+
+
+
+
+
+
+
+
+ An XPath 2.0 expression.
+
+
+
+
+
+
+
+
+
+
+ Describes how type annotations in source documents are handled.
+
+
+
+
+
+
+
+
+
+
+
+
+ The level attribute of xsl:number:
+ one of single, multiple, or any.
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:apply-templates:
+ either a QName, or #current, or #default.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The mode attribute of xsl:template:
+ either a list, each member being either a QName or #default;
+ or the value #all
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of NameTests, as defined in the XPath 2.0 Recommendation.
+ Each NameTest is either a QName, or "*", or "prefix:*", or "*:localname"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The method attribute of xsl:output:
+ Either one of the recognized names "xml", "xhtml", "html", "text",
+ or a QName that must include a prefix.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A match pattern as defined in the XSLT 2.0 Recommendation.
+ The syntax for patterns is a restricted form of the syntax for
+ XPath 2.0 expressions.
+
+
+
+
+
+
+
+
+ Either a namespace prefix, or #default.
+ Used in the xsl:namespace-alias element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ A list of QNames.
+ Used in the [xsl:]use-attribute-sets attribute of various elements,
+ and in the cdata-section-elements attribute of xsl:output
+
+
+
+
+
+
+
+
+ A QName.
+ This schema does not use the built-in type xs:QName, but rather defines its own
+ QName type. Although xs:QName would define the correct validation on these attributes,
+ a schema processor would expand unprefixed QNames incorrectly when constructing the PSVI,
+ because (as defined in XML Schema errata) an unprefixed xs:QName is assumed to be in
+ the default namespace, which is not the correct assumption for XSLT.
+ The data type is defined as a restriction of the built-in type Name, restricted
+ so that it can only contain one colon which must not be the first or last character.
+
+
+
+
+
+
+
+
+
+
+ The description of a data type, conforming to the
+ SequenceType production defined in the XPath 2.0 Recommendation
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+ Describes different ways of type-annotating an element or attribute.
+
+
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no".
+
+
+
+
+
+
+
+
+
+
+
+ One of the values "yes" or "no" or "omit".
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/extensions/pom.xml b/extensions/pom.xml
index f24898f3c..b21a76dbc 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -11,5 +11,6 @@
pomorg.eclipse.lsp4xml.emmet
+ org.eclipse.lsp4xml.xsl
\ No newline at end of file