XSL and JS- PROGID, createDocument & XSLTProcessor Issue
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 3
- Joined: Wed May 21, 2008 8:36 am
XSL and JS- PROGID, createDocument & XSLTProcessor Issue
Where do I begin...
OK, I have a Javascript function that loads a XML document, a XSL document, adds some parameters, does a transformation and creates a HTML document.
In IE, everything works PERFECTLY!
In Firefox I get the following error:
The function 'string-compare' in the namespace 'urn:schemas-microsoft-com:xslt' is not recognised.
When Using IE I am able to specify the PROGID for the XSL document I load using the following Javascript code:
This means that by using the MSXML4.0 class, I can expose this 'string-compare' function as it is only available from MSXML4.0+
No problems...
However, I have to use the following code for non IE browsers Firefox, Opera, Mozilla etc to create an XSL document:
I appear to have no control as to which version of MSXML is used. I assume that this is MSXML2.0 or MSXML3.0... 
I have been searching for hours for a solution but have hit a brick wall.
Does anyone know how to specify the PROGID for Firefox, Opera, etc when creating a document?
If anyone has any clues, advice or references that may solve the issue I would be very very grateful.
Thanks in advance,
Freshbru
OK, I have a Javascript function that loads a XML document, a XSL document, adds some parameters, does a transformation and creates a HTML document.
In IE, everything works PERFECTLY!
In Firefox I get the following error:
In Opera I get the following (more verbose) error:Error: uncaught exception: [Exception... "Component returned failure code: 0x8060000e [nsIXSLTProcessor.transformToDocument]" nsresult: "0x8060000e (<unknown>)" location: "JS frame :: http://localhost/application%20noticebo ... _script.js :: getApplications :: line 536" data: no]
So I have identified where the issue is occuring:XSLT - file://localhost/C:/Inetpub/wwwroot/application%20noticeboard/xsl/application%20noticeboard.xsl
attribute at unknown location (no line number information available)
Error: invalid expression: Applications/Application[OrganisationApplicant[contains(translate(., $upper, $lower), $orgApp)] and Suburb[contains(translate(., $upper, $lower), $suburb)] and AreaPostCode[contains(translate(., $upper, $lower), $postCode)] and LGA[contains(translate(., $upper, $lower), $lGA)] and LicenceType[contains(translate(., $upper, $lower), $appType)] and Status[contains(translate(., $upper, $lower), $appStatus)] and msxsl:string-compare(number(concat('20',substring(LodgedDate,7,2),substring(LodgedDate,4,2),substring(LodgedDate,1,2))),$dtePosted,'en-US', 'i') = number($dteOperator)]
Call to undefined function: string-compare (namespace: urn:schemas-microsoft-com:xslt)
JavaScript - file://localhost/C:/Inetpub/wwwroot/application%20noticeboard/html/application%20noticeboard.html
Timeout thread: delay 1000 ms
Error:
Unhandled exception: [Object InternalException]
code: 5
message: XSLT_PROCESSING_FAILED_ERR
Backtrace:
Line 536 of linked script file://localhost/C:/Inetpub/wwwroot/application%20noticeboard/js/search_script.js
xmlDoc = xsltProc.transformToDocument(xmlDoc);
Line 1 of unknown script
getApplications("", getTextValue("orgApp"), getTodayDateSerial(), getDateSerial(getTextValue("dtePosted")), "", getOperator(getSelectValue("selectPosted")), getSelectValue("selectSuburbs"), getSelectValue("selectPostcode"), getSelectValue("selectLGA"), getSelectValue("selectAppType"),
The function 'string-compare' in the namespace 'urn:schemas-microsoft-com:xslt' is not recognised.
When Using IE I am able to specify the PROGID for the XSL document I load using the following Javascript code:
Code: Select all
var xslt = new ActiveXObject('Msxml2.XSLTemplate.4.0');
xslt.stylesheet = xslDoc;
No problems...
However, I have to use the following code for non IE browsers Firefox, Opera, Mozilla etc to create an XSL document:
Code: Select all
var xsl=document.implementation.createDocument('','',null);
xsl.async=false;
xsl.load(xslTemplate);

I have been searching for hours for a solution but have hit a brick wall.
Does anyone know how to specify the PROGID for Firefox, Opera, etc when creating a document?
If anyone has any clues, advice or references that may solve the issue I would be very very grateful.
Thanks in advance,
Freshbru
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