java.lang.Object
dev.metaschema.core.metapath.format.XPathFormatter
- All Implemented Interfaces:
IPathFormatter
An
IPathFormatter that produces XPath 3.1 expressions with
namespace-qualified names using the EQName format (e.g.,
Q{namespace}localname).
This formatter produces paths suitable for use with XML tooling that requires namespace qualification. The format follows the XPath 3.1 specification for EQNames.
Example output:
/Q{http://example.com}catalog/Q{http://example.com}control[1]/@Q{http://example.com}id
For elements with XML grouping (XmlGroupAsBehavior.GROUPED), the
wrapper element is included in the path with position [1], followed by the
actual element with its position.
- See Also:
-
Field Summary
Fields inherited from interface dev.metaschema.core.metapath.format.IPathFormatter
JSON_POINTER_PATH_FORMATTER, METAPATH_PATH_FORMATER, XPATH_PATH_FORMATTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis visitor callback is used to format an individual grouped assembly path segment.formatAssembly(IAssemblyNodeItem assembly) This visitor callback is used to format an individual assembly path segment.formatDocument(IDocumentNodeItem document) This visitor callback is used to format an individual document path segment.formatField(IFieldNodeItem field) This visitor callback is used to format an individual field path segment.formatFlag(IFlagNodeItem flag) This visitor callback is used to format an individual flag path segment.formatMetaschema(IModuleNodeItem metaschema) This visitor callback is used to format an individual metaschema path segment.This visitor callback is used to format a root assembly path segment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.metaschema.core.metapath.format.IPathFormatter
format
-
Constructor Details
-
XPathFormatter
public XPathFormatter()
-
-
Method Details
-
formatMetaschema
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual metaschema path segment.- Specified by:
formatMetaschemain interfaceIPathFormatter- Parameters:
metaschema- the node to format- Returns:
- the formatted text for the segment
-
formatDocument
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual document path segment.- Specified by:
formatDocumentin interfaceIPathFormatter- Parameters:
document- the node to format- Returns:
- the formatted text for the segment
-
formatRootAssembly
Description copied from interface:IPathFormatterThis visitor callback is used to format a root assembly path segment.- Specified by:
formatRootAssemblyin interfaceIPathFormatter- Parameters:
root- the node to format- Returns:
- the formatted text for the segment
-
formatAssembly
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual assembly path segment.- Specified by:
formatAssemblyin interfaceIPathFormatter- Parameters:
assembly- the node to format- Returns:
- the formatted text for the segment
-
formatAssembly
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual grouped assembly path segment.- Specified by:
formatAssemblyin interfaceIPathFormatter- Parameters:
assembly- the node to format- Returns:
- the formatted text for the segment
-
formatField
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual field path segment.- Specified by:
formatFieldin interfaceIPathFormatter- Parameters:
field- the node to format- Returns:
- the formatted text for the segment
-
formatFlag
Description copied from interface:IPathFormatterThis visitor callback is used to format an individual flag path segment.- Specified by:
formatFlagin interfaceIPathFormatter- Parameters:
flag- the node to format- Returns:
- the formatted text for the segment
-