SC.Parser.SCXML.LocationTracker (sc v1.0.2)

View Source

Handles location tracking for SCXML parsing using XML string analysis.

This module provides functionality to accurately track line and column positions of XML elements and attributes during SAX parsing.

Summary

Functions

Get the location of a specific attribute within the XML.

Get the document order for an element based on element counts. This represents the sequential order in which elements appear in the document.

Calculate the location of an element based on the XML string and element counts.

Functions

attribute_location(xml_string, attr_name, element_location)

@spec attribute_location(String.t(), String.t(), map()) :: map()

Get the location of a specific attribute within the XML.

document_order(element_counts)

@spec document_order(map()) :: integer()

Get the document order for an element based on element counts. This represents the sequential order in which elements appear in the document.

get_location_info(xml_string, element_name, element_stack, element_counts)

@spec get_location_info(String.t(), String.t(), map(), map()) :: map()

Calculate the location of an element based on the XML string and element counts.