コード例 #1
0
ファイル: TestOutcome.cs プロジェクト: orbeon/saxon-he
 private bool AssertSerializationMatches(XdmNode assertion, SingleResultDoc result, XPathCompiler catalogXpc)
 {
     if (IsException())
     {
         return(false);
     }
     else
     {
         //string testSet = catalogXpc.Evaluate("string(/*/@name)", assertion).ToString();
         string flagsAtt = assertion.GetAttributeValue(new QName("flags"));
         if (flagsAtt == null)
         {
             flagsAtt = "";
         }
         string regex = assertion.StringValue;
         //IList warnings = new ArrayList();
         try {
             JRegularExpression re = JConfiguration.getPlatform().compileRegularExpression(regex, flagsAtt, "XP30", new java.util.ArrayList());
             if (re.containsMatch(getPrincipalSerializedResult()))
             {
                 return(true);
             }
             else
             {
                 driver.println("Serialized result:");
                 driver.println(getPrincipalSerializedResult());
                 return(false);
             }
         } catch (DynamicError e) {
             throw e;
         }
     }
 }