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
Hello,
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
This is my XML that should be transformed using the XSLT
However, when I'm trying to apply the transformation, I'm getting this error ->
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?
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="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:exsl="http://exslt.org/common"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:func="http://exslt.org/functions"
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'"/>
</func:function>
<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:param>
<xsl:variable name="fields" select="FIELDS"/>
<!-- Other instructions -->
</xsl:template>
</xsl:stylesheet>
Code: Select all
<?xml version="1.0" encoding="utf-16"?>
<ROOT>
<NODES>
<SOME_NODE></SOME_NODE>
......
</NODES>
<FIELDS>
<field>MandatoryField</field>
<field>NotMandatoryField</field>
<field>SomeMandatoryField</field>
<field>...</field>
</FIELDS>
</ROOT>
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.XmlLab.nxslt.NXsltException: An error occurred while executing transformation: System.Xml.Xsl.XslTransformException: Cannot find the script or external object that implements prefix 'http://exslt.org/functions'.
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: 9418
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Error while trying to transform an XML using XSLT 1.0
Hi,
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.
Regards,
Radu
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.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service