当前位置: 首页>>代码示例>>Java>>正文


Java Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE属性代码示例

本文整理汇总了Java中org.apache.xml.security.c14n.Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE属性的典型用法代码示例。如果您正苦于以下问题:Java Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE属性的具体用法?Java Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE怎么用?Java Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.xml.security.c14n.Canonicalizer的用法示例。


在下文中一共展示了Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test31withCommentsSubset

/**
 * 3.1 PIs, Comments, and Outside of Document Element
 *
 * @throws CanonicalizationException
 * @throws FileNotFoundException
 * @throws IOException
 * @throws InvalidCanonicalizerException
 * @throws ParserConfigurationException
 * @throws SAXException
 * @throws TransformerException
 * @throws XPathExpressionException
 */
@org.junit.Test
public void test31withCommentsSubset()
    throws IOException, FileNotFoundException, SAXException,
    ParserConfigurationException, CanonicalizationException,
    InvalidCanonicalizerException, TransformerException, XPathExpressionException {
    String descri =
        "3.1: PIs, Comments, and Outside of Document Element. (commented)";

    String fileIn = prefix + "in/31_input.xml";
    String fileRef = prefix + "in/31_c14n-comments.xml";
    String fileOut = prefix + "out/xpath_31_output-comments.xml";
    String c14nURI = Canonicalizer.ALGO_ID_C14N_WITH_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:30,代码来源:Canonicalizer20010315Test.java

示例2: test31subset

/**
 * 3.1 PIs, Comments, and Outside of Document Element
 *
 * @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-OutsideDoc">the example from the spec</A>
 * @throws TransformerException
 * @throws XPathExpressionException
 */
@org.junit.Test
public void test31subset()
    throws IOException, FileNotFoundException, SAXException,
    ParserConfigurationException, CanonicalizationException,
    InvalidCanonicalizerException, TransformerException, XPathExpressionException {

    String descri =
        "3.1: PIs, Comments, and Outside of Document Element. (uncommented)";
    String fileIn = prefix + "in/31_input.xml";
    String fileRef = prefix + "in/31_c14n.xml";
    String fileOut = prefix + "out/xpath_31_output.xml";
    String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:31,代码来源:Canonicalizer20010315Test.java

示例3: test32subset

/**
 * 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 test32subset()
    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_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:29,代码来源:Canonicalizer20010315Test.java

示例4: test33subset

@org.junit.Test
public void test33subset()
    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_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:16,代码来源:Canonicalizer20010315Test.java

示例5: test35subset

/**
 * 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 test35subset()
    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_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:29,代码来源:Canonicalizer20010315Test.java

示例6: test36subset

/**
 * 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 test36subset()
    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_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:29,代码来源:Canonicalizer20010315Test.java

示例7: test34subset

/**
 * 3.4 Character Modifications and Character References (patched to run on validating Parsers)
 * <P>
 * <A HREF="http://www.w3.org/TR/2001/PR-xml-c14n-20010119"> The spec</A> states that:
 * <P>
 * Note: The last element, normId, is well-formed but violates a validity
 * constraint for attributes of type ID. For testing canonical XML
 * implementations based on validating processors, remove the line
 * containing this element from the input and canonical form. In general,
 * XML consumers should be discouraged from using this feature of XML.
 *
 * @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-Chars">the example from the spec</A>
 * @throws TransformerException
 * @throws XPathExpressionException
 */
@org.junit.Test
public void test34subset()
    throws IOException, FileNotFoundException, SAXException,
    ParserConfigurationException, CanonicalizationException,
    InvalidCanonicalizerException, TransformerException, XPathExpressionException {

    String descri =
        "3.4 Character Modifications and Character References. (uncommented, patched to run on validating Parsers)";
    String fileIn = prefix + "in/34_input_validatingParser.xml";
    String fileRef = prefix + "in/34_c14n_validatingParser.xml";
    String fileOut = prefix + "out/xpath_34_output_validatingParser.xml";
    String c14nURI = Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS;
    boolean validating = true;
    String xpath = Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE;

    assertTrue(descri,
               c14nAndCompare(fileIn, fileRef, fileOut, c14nURI, validating, xpath));
}
 
开发者ID:Legostaev,项目名称:xmlsec-gost,代码行数:39,代码来源:Canonicalizer20010315Test.java


注:本文中的org.apache.xml.security.c14n.Canonicalizer.XPATH_C14N_WITH_COMMENTS_SINGLE_NODE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。