本文整理汇总了Java中org.apache.xml.security.c14n.Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS属性的典型用法代码示例。如果您正苦于以下问题:Java Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS属性的具体用法?Java Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS怎么用?Java Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.xml.security.c14n.Canonicalizer
的用法示例。
在下文中一共展示了Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: test32subtree
/**
* 3.2 Whitespace in Document Content
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-WhitespaceInContent">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test32subtree()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.2 Whitespace in Document Content. (uncommented)";
String fileIn = prefix + "in/32_input.xml";
String fileRef = prefix + "in/32_c14n.xml";
String fileOut = prefix + "out/xpath_32_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
String xpath = null;
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
示例2: test33subtree
/**
* 3.3 Start and End Tags
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-SETags">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test33subtree()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.3 Start and End Tags. (uncommented)";
String fileIn = prefix + "in/33_input.xml";
String fileRef = prefix + "in/33_c14n.xml";
String fileOut = prefix + "out/xpath_33_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
String xpath = null; // Canonicalizer.XPATH_C14N_OMIT_COMMENTS_SINGLE_NODE;
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
示例3: test34
/**
* 3.4 Character Modifications and Character References
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see #test34validatingParser
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-Chars">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test34()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri =
"3.4 Character Modifications and Character References. (uncommented)";
String fileIn = prefix + "in/34_input.xml";
String fileRef = prefix + "in/34_c14n.xml";
String fileOut = prefix + "out/xpath_34_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = false;
String xpath = null;
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
示例4: test35subtree
/**
* 3.5 Entity References
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-Entities">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test35subtree()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.5 Entity References. (uncommented)";
String fileIn = prefix + "in/35_input.xml";
String fileRef = prefix + "in/35_c14n.xml";
String fileOut = prefix + "out/xpath_35_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
String xpath = null;
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
示例5: test36subtree
/**
* 3.6 UTF-8 Encoding
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-UTF8">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test36subtree()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.6 UTF-8 Encoding. (uncommented)";
String fileIn = prefix + "in/36_input.xml";
String fileRef = prefix + "in/36_c14n.xml";
String fileOut = prefix + "out/xpath_36_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
String xpath = null;
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
示例6: test37
/**
* 3.7 Document Subsets
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @see <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119#Example-DocSubsets">the example from the spec</A>
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test37()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.7 Document Subsets. (uncommented)";
String fileIn = prefix + "in/37_input.xml";
String fileRef = prefix + "in/37_c14n.xml";
String fileOut = prefix + "out/xpath_37_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
Map<String, String> namespace = new HashMap<String, String>();
namespace.put("ietf", "http://www.ietf.org");
String xpath =
"(//. | //@* | //namespace::*)"
+ "[ "
+ "self::ietf:e1 or "
+ "(parent::ietf:e1 and not(self::text() or self::e2)) or "
+ "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) "
+ "]";
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace));
}
示例7: test38
/**
* 3.8 Document Subsets and XML Attributes
*
* @throws CanonicalizationException
* @throws FileNotFoundException
* @throws IOException
* @throws InvalidCanonicalizerException
* @throws ParserConfigurationException
* @throws SAXException
* @throws TransformerException
* @throws XPathExpressionException
*/
@org.junit.Test
public void test38()
throws IOException, FileNotFoundException, SAXException,
ParserConfigurationException, CanonicalizationException,
InvalidCanonicalizerException, TransformerException, XPathExpressionException {
String descri = "3.8 Document Subsets and XML Attributes (uncommented)";
String fileIn = prefix + "in/38_input.xml";
String fileRef = prefix + "in/38_c14n.xml";
String fileOut = prefix + "out/xpath_38_output.xml";
String c14nURI = Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
boolean validating = true;
Map<String, String> namespace = new HashMap<String, String>();
namespace.put("ietf", "http://www.ietf.org");
String xpath =
"(//. | //@* | //namespace::*)"
+ "[ "
+ "self::ietf:e1 or "
+ "(parent::ietf:e1 and not(self::text() or self::e2)) or "
+ "count(id(\"E3\")|ancestor-or-self::node()) = count(ancestor-or-self::node()) "
+ "]";
assertTrue(descri,
c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath, namespace));
}
示例8: getCanonicalizationMethod
@Override
protected String getCanonicalizationMethod() {
return Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
}
示例9: engineGetURI
public final String engineGetURI() {
return Canonicalizer.ALGO_ID_C14N11_OMIT_COMMENTS;
}