Link to home
Start Free TrialLog in
Avatar of piratepatrol
piratepatrolFlag for United States of America

asked on

Prefix Not Defined

Hello friends,

The following is a portion of my XSLT:

<?xml version="1.0"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ercot="http://www.sungard.com/consulting/ercot" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ms="urn:schemas-microsoft-com:office:spreadsheet" xmlns="urn:schemas-microsoft-com:office:spreadsheet" exclude-result-prefixes="ms o x ss">
<xsl:import href="file://C:/tibcoprojects/pnmr/SimpleSchedulingToolExternalFiles/XSLT/date.add.template.xsl" />
<xsl:import href="file://C:/tibcoprojects/pnmr/SimpleSchedulingToolExternalFiles/XSLT/date.format-date.template.xsl" />
  <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" omit-xml-declaration="no" indent="yes" />
  <xsl:param name="qse">FCPLPSQ2</xsl:param>
 
  <xsl:param name="flow_date" as="xs:date">
    <xsl:call-template name="date:add">
      <xsl:with-param name="date-time" select="current-date()"/>
      <xsl:with-param name="duration" select="'P1D'"/>
    </xsl:call-template>
  </xsl:param>

Can someone tell me why I get a "prefix not defined" error on the line below?

<xsl:call-template name="date:add">

Your help would be so greatly appreciated.  Thank you so much.


Jazon
Avatar of hielo
hielo
Flag of Wallis and Futuna image

You did not provide the date namespace. Try adding: xmlns:add="http://somesite.com"

<xsl:stylesheet version="2.0" xmlns:add="http://somesite.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ercot="http://www.sungard.com/consulting/ercot" xmlns:fn="http://www.w3.org/2005/02/xpath-functions" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:xdt="http://www.w3.org/2005/02/xpath-datatypes" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:ms="urn:schemas-microsoft-com:office:spreadsheet" xmlns="urn:schemas-microsoft-com:office:spreadsheet" exclude-result-prefixes="ms o x ss">
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of piratepatrol

ASKER

Gertrone is an XSLT god!  

Thanks so much, guys.