* xmlSchematronParseTestReportMsg: * @ctxt: the schema parser context * @con: the assert or report node * * Format the message content of the assert or report test */
| 912 | * Format the message content of the assert or report test |
| 913 | */ |
| 914 | static void |
| 915 | xmlSchematronParseTestReportMsg(xmlSchematronParserCtxtPtr ctxt, xmlNodePtr con) |
| 916 | { |
| 917 | xmlNodePtr child; |
| 918 | xmlXPathCompExprPtr comp; |
| 919 | |
| 920 | child = con->children; |
| 921 | while (child != NULL) { |
| 922 | if ((child->type == XML_TEXT_NODE) || |
| 923 | (child->type == XML_CDATA_SECTION_NODE)) |
| 924 | /* Do Nothing */ |
| 925 | {} |
| 926 | else if (IS_SCHEMATRON(child, "name")) { |
| 927 | /* Do Nothing */ |
| 928 | } else if (IS_SCHEMATRON(child, "value-of")) { |
| 929 | xmlChar *select; |
| 930 | |
| 931 | select = xmlGetNoNsProp(child, BAD_CAST "select"); |
| 932 | |
| 933 | if (select == NULL) { |
| 934 | xmlSchematronPErr(ctxt, child, |
| 935 | XML_SCHEMAV_ATTRINVALID, |
| 936 | "value-of has no select attribute", |
| 937 | NULL, NULL); |
| 938 | } else { |
| 939 | /* |
| 940 | * try first to compile the test expression |
| 941 | */ |
| 942 | comp = xmlXPathCtxtCompile(ctxt->xctxt, select); |
| 943 | if (comp == NULL) { |
| 944 | xmlSchematronPErr(ctxt, child, |
| 945 | XML_SCHEMAV_ATTRINVALID, |
| 946 | "Failed to compile select expression %s", |
| 947 | select, NULL); |
| 948 | } |
| 949 | xmlXPathFreeCompExpr(comp); |
| 950 | } |
| 951 | xmlFree(select); |
| 952 | } |
| 953 | child = child->next; |
| 954 | continue; |
| 955 | } |
| 956 | } |
| 957 | |
| 958 | /** |
| 959 | * xmlSchematronParseRule: |
no test coverage detected