Skip to main content

Function: xpathToRel()

function xpathToRel(xpath, ctx?): XpathToRelResult;

Defined in: xpath.ts:916

Translates one ODK XPath expression (as written in an XLSForm cell, so ${name} references are expected and preserved) into REL.

Throws RASD_XLSFORM_UNSUPPORTED for constructs with no REL shape; the importer catches it, leaves the property empty, keeps the original under ext["org.getodk.xpath"] and warns W_XPATH_UNMAPPED (docs/20 §2.7).

Parameters

ParameterType
xpathstring
ctxXpathToRelContext

Returns

XpathToRelResult