### Escaped XPointer Example
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/xmldsig/xpointer/xpointerscheme-Readme-RFC2396_RFC2732-diff-RFC3986.txt
This example demonstrates the correct escaping of square brackets within an XPointer to comply with RFC 3986.
```xml
#xpointer(//*%5B@authenticate='true'%5D)
```
--------------------------------
### Linking Stylesheets with xml-stylesheet
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/com/pothole/xmldsig/xml-stylesheet.txt
Examples of linking stylesheets using the 'xml-stylesheet' processing instruction. Demonstrates different ways to specify the stylesheet, including compact and media-specific links.
```xml
```
```xml
```
```xml
```
--------------------------------
### Multiple XML Stylesheet Processing Instructions
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/TR/xml-stylesheet.html
This example illustrates how multiple xml-stylesheet processing instructions can be used to link several stylesheets, including alternate ones, similar to multiple HTML LINK elements.
```xml
```
```xml
```
```xml
```
```xml
```
--------------------------------
### Alternate XML Stylesheet Processing Instruction
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/TR/xml-stylesheet.html
This example shows an alternate stylesheet using the xml-stylesheet processing instruction, equivalent to an HTML LINK with alternate stylesheet.
```xml
```
--------------------------------
### Basic XML Stylesheet Processing Instruction
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/TR/xml-stylesheet.html
This is a basic example of the xml-stylesheet processing instruction, equivalent to an HTML LINK element for a CSS stylesheet.
```xml
```
--------------------------------
### Regenerate PKCS12 Keystore with OpenSSL
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/xmlenc-core-11/README.md
Use this bash script to regenerate PKCS12 files with modern encryption algorithms, making them compatible with recent Java security policies. It requires openssl to be installed and takes the base filename as an argument.
```bash
#!/usr/bin/env bash
FILENAME=$1
PASSPHRASE="passwd"
# Regenerate a PKCS12 with up-to-date encryption algorithm so that it can be used with latest java security policy
echo "Regenerating PKCS12 file $FILENAME.p12 to $FILENAME-v02.p12"
openssl pkcs12 -in "${FILENAME}.p12" -passin pass:${PASSPHRASE} -out "${FILENAME}.pem" -nodes -nokeys
openssl pkcs12 -in "${FILENAME}.p12" -passin pass:${PASSPHRASE} -out "${FILENAME}.key" -nodes -nocerts
openssl pkcs12 -export -out "${FILENAME}-v02.p12" -passin pass:${PASSPHRASE} -passout pass:${PASSPHRASE} -inkey "${FILENAME}.key" -in "${FILENAME}.pem" -name "test-certificate"
echo "Cleaning the temporary files ${FILENAME}.pem and ${FILENAME}.key"
rm "${FILENAME}.pem"
rm "${FILENAME}.key"
echo "Done"
```
--------------------------------
### XML Stylesheet with Title
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/TR/xml-stylesheet.html
This example demonstrates the xml-stylesheet processing instruction with a title attribute, similar to an HTML LINK element with a title.
```xml
```
--------------------------------
### Test Case 2: xml:base Propagation from First Level Element
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/testcases.html
Verifies xml:base propagation when the output subset starts from the first-level element 'ietf:e1', ensuring the base is correctly established at this level.
```xpath
(//. | //@* | //namespace::*) [ancestor-or-self::ietf:e1]
```
```xml
```
--------------------------------
### Multiple xml-stylesheet Instructions
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/at/iaik/ixsil/transforms/samples/sampleBase64EncodedData.txt
Shows how to use multiple xml-stylesheet processing instructions to associate different style sheets with an XML document, similar to HTML's LINK element.
```xml
```
```xml
```
--------------------------------
### Multiple Stylesheet Links
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/com/pothole/xmldsig/xml-stylesheet.txt
Illustrates how multiple 'xml-stylesheet' processing instructions can be used to link different stylesheets. This allows for alternative or complementary styling options.
```xml
```
```xml
```
--------------------------------
### XML Output with xml:base Propagation (Test Case 6)
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/testcases.html
This XML snippet demonstrates the expected output for a test case where xml:base is built for an element that originally lacked it, due to absent intermediate levels.
```xml
```
--------------------------------
### XML Output with xml:base Propagation (Test Case 5)
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/testcases.html
This XML snippet shows the expected output for a test case involving xml:base propagation when one intermediate level is absent.
```xml
```
--------------------------------
### XML Signature with Multiple Schema-based XPointers
Source: https://github.com/apache/santuario-xml-security-java/blob/main/src/test/resources/org/w3c/www/interop/testcases.html
Tests implementation behavior when processing multiple elements referenced by their ID using schema-based XPointers. Includes elements with and without comments. Uses XML-C14N 1.1 with comments.
```xml
\
\
\
\
\
\
\
\
\
XhSsDpWTt+ti0kcU9XYpleRDHfQ=\
\
\
\
\
\
abyA1j4yzf1IgQLWwDwKuU9l8Ik=\
\
\
\
\
\
RUUBiUeFf8uRqTlpCyutkXDqnJ4=\
\
sG+0pHk9TB6v7jES9RZUIVKMFos=\