Top

module PrototypeProcessor

smx.Prototype. PrototypeProcessor

This processor will parse and process all nodes. Uses JSCSSP internally.

Details:
To Do:

Methods

processXMLDocument(xml, options)

Processes the given XMLDocument

Parameters
  • xml {XMLDocument}
  • options {Object}
    • [max_iterations=1] {Integer} :

      Maximum number of prototype blocks to process at once.

    • [propagate=true] {Boolean} :

      If true the processed data will be propagated to matching XML nodes.

    • callback {function} :

      Callback function executed on processing complete.

processXMLNode(xmlNode) → {Object|String|Array.<Object>}

Processes the given XMLNode

Parameters
  • xmlNode {XMLNode}
Returns
  • {Object} :

    data

  • {String} :

    data.id

  • {Array.<Object>} :

    data.rules

applyPrototypes(xmlDocument, data) → {XMLDocument}

Apply the processed data into given XMLNode

Parameters
  • xmlDocument {XMLDocument}
  • data {Object}
Returns
  • {XMLDocument} :

    result