procedure GetTransformationRulesText (
     claimsTransformRulesXML : unicodestring, 
     claimsTransformRulesText : unicodestring) : ULONG

This procedure validates the given string for the expected XML encapsulation of claims transformation rules stored in the directory and retrieves the plain-text claims transformation rules from the XML. For explanatory purposes, this procedure uses an XPath 1.0 [XPATH] query to extract the plain-text rules from the XML.

claimsTransformRulesXML: The XML-encapsulated rules text that was read from the directory.

claimsTransformRulesText: The rules text that is extracted from the given input.

Return Values: This procedure returns zero upon success along with the claims transformation rules text; otherwise, this procedure returns an error.

Logical Processing: (includes citation for [XMLSCHEMA1])

 1.  Set claimsTransformRulesText to NULL
 2.  If claimsTransformRulesXML is NULL, return zero.
 3.  If claimsTransformRulesXML is not well-formed XML (see [XMLSCHEMA1])
     return an error.
 4.  Extract the rules from the first Rules node by executing the following
     XPath query over claimsTransformRulesXML:
 5.  If the XPATH query in step 4 cannot be executed, return an error.
 6.  Set claimsTransformRulesText equal to the results of the XPATH query in
     step 4 and return success.