devxlogo

Blocking Namespace Declarations in XSLT Transformation Results

Blocking Namespace Declarations in XSLT Transformation Results

Suppose you want to block a namespace declaration from appearing in your XSLT transformation results; for example, suppose you have the namespace declaration of a function/element extension. You’d have to use the exclude-result-prefixes attribute in the stylesheet element. The value of this attribute is a list of prefixes separated by spaces.

Here’s an example:

<?xml version="1.0" encoding="UTF-8"?>

In the above example, the myPrefix://just.for.fun/java.io.FileReader and xalan://java.io.BufferedReader declarations will not be copied.

See also  5 Tips for Choosing the Right Medical Software for Your Practice
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist