Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Compiler

Index

Methods

compile

  • compile(patch: Patch, action: ElementImpl): boolean
  • Goes through all extracted actions, performs checking and namespace mangling.

    Parameters

    • patch: Patch

      the patch document

    • action: ElementImpl

      the action to be compiled

    Returns boolean

compileLiteral

  • compileLiteral(token: string): string
  • Compiles a literal token.

    Parameters

    • token: string

      the token to be compiled

    Returns string

compileQName

  • compileQName(token: string, isAttr: boolean): string
  • Compiles a QName token.

    Parameters

    • token: string

      the token to be compiled

    • isAttr: boolean

      whether the token is an attribute

    Returns string

getPrefix

  • getPrefix(prefix: string, isAttr: boolean): string | null
  • Lookup the prefix, falling back to ancestors.

    Parameters

    • prefix: string
    • isAttr: boolean

    Returns string | null

mangleNamespace

  • mangleNamespace(expression: string): string
  • This is a simple process. It's not supposed to work on complex XPath expressions. Currently it expands qualified names in simple expressions of form a/b/c to expressions with predicates *[namespace-uri()='uuu'][local-name()='nnn']. Also, quotation marks are not dealt with either.

    Parameters

    • expression: string

      the XPath expression to be mangled

    Returns string

mangleQName

  • mangleQName(prefix: string, name: string, isAttr: boolean): string
  • Actually mangles the namespace.

    Parameters

    • prefix: string
    • name: string
    • isAttr: boolean

    Returns string

predicate

  • predicate(name: string, namespace?: string | null): string
  • Makes a predicate expression instead of plain names, for our convenience.

    Parameters

    • name: string
    • Optional namespace: string | null

    Returns string

tokenizeQName

  • tokenizeQName(qname: string): string[]

Generated using TypeDoc