Error while trying to transform an XML using XSLT 1.0

Here should go questions about transforming XML with XSLT and FOP.
Posts: 1
Joined: Mon Jul 26, 2021 1:54 pm

Error while trying to transform an XML using XSLT 1.0

Post by skoleva » Mon Jul 26, 2021 2:19 pm


I'm trying to create a function that will check if a node value exists in given XML. If yes, I should write another node/value for the final XML.
This is part of my stylesheet

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=""
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:exsl=""
    xmlns:xs="" xmlns:func=""
    extension-element-prefixes="exsl func">

    <!-- Format for output document -->
	<xsl:output method="xml" indent="yes"/>
    <func:function name="func:isfieldmandatory">
        <xsl:param name="fields" select="''"/>
        <xsl:param name="fieldName" select="''"/>
        <xsl:param name="country" select="''"/>
        <xsl:param name="nodeToCheck" select="."/>
        <func:result select="'yes'"/>
    <xsl:variable name="result" select="func:isfieldmandatory('', 'SomeMandatoryField')"/>
    <!-- Find the ROOT element and data underneath it -->
    <xsl:template match="ROOT">

        <!-- Declare a variable for date -->
        <xsl:param name="date">
            <xsl:value-of select="timestamp"/>
        <xsl:variable name="fields" select="FIELDS"/>
        <!-- Other instructions -->
This is my XML that should be transformed using the XSLT

Code: Select all

<?xml version="1.0" encoding="utf-16"?>
However, when I'm trying to apply the transformation, I'm getting this error ->
XmlLab.nxslt.NXsltException: An error occurred while executing transformation: System.Xml.Xsl.XslTransformException: Cannot find the script or external object that implements prefix ''.
In OXYGEN, i'm using .NET 2.0 engine and XSLT version 1.0. I'm not supposed to use version 2.0 because the system that will use the stylesheet doesn't support it.

I tried some examples from the Internet that use a 'my' namespace but it seems that I cannot make them working.

Does someone have an idea what i'm missing or what's wrong with my stylesheet?

Posts: 7594
Joined: Fri Jul 09, 2004 5:18 pm

Re: Error while trying to transform an XML using XSLT 1.0

Post by Radu » Tue Jul 27, 2021 7:33 am


I'm afraid we (the Oxygen team) are not familiar with .Net 1.0's support for XSLT functions, it seems it does not support them.
Maybe you can try to ask around on Stack Overflow or on a public XSLT users list, see if you find others who have worked more with .NET 1.0.

Radu Coravu
<oXygen/> XML Editor

Post Reply