Hello!
–
My system is:
TAMINO 3.1.1.1
Apache 1.3.22 + SSL module
Windows 2000 Professional PL + SP2
Internet Explorer 6.0 PL
–
I want to add possibility by dynamic define xsl stylesheet by various color, fonts, tables etc. by creating stylesheet in my string variable named “str”. I try load this stylesheet by line:
var r = client.getDocument(str)
but unfortunately this returned “zero”, in message box like this:
alert(r.xml);
I got something like this:
<?xml version="1.0"?>
<ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”><ino:message ino:returndvalue=“8554”><ino:messagetext ino:code=INOXME8554">No message received</ino:messagetext></ino:message></ino:response>
It seems like one records found, but I must admit that when I have tried like this:
var r = client.getDocument(“https://darekb/tamino/database/doc/style/mystyle001.xsl); - it is stylesheet stored in TAMINO
or
var r = client.getDocument(“https://darekb/tamino/doc/mystyle001.xsl”) - it is the physical file on my hard disk
it works pretty good in both above ways!!
Can anyone help me? What is wrong in variable “str”? How can I load my variable in properly way [instead of like this: var r = client.getDocument(str)] Any other way is possible to load string stylesheet?
Thanks for support!
Best regards
Dariusz Baumann
POLAND
-------------------------------
This is my javascript
var nl = unescape(”%0D%0A");
str = ‘’;
str += ‘<?xml version="1.0"?>’ +nl;
str += ‘<xsl:stylesheet xmlns:xsl=“XSLT Namespace” version=“1.0”>’ +nl;
str += ‘<xsl:output method=“html”/>’ +nl;
str += ‘<xsl:template match=“/”>’ +nl;
str += ‘’ +nl;
str += ‘’ +nl;
str += ’
str += ‘<xsl:for-each select=“//dok”>’ +nl;
str += ‘
’ +nl;str += ’ ’ +nl;
str += ’
’ +nl;str += ’ ’ +nl;
str += ’ ’ +nl;
str += ’ ’ +nl;
str += ’ ’ +nl;
str += ‘’ +nl;
str += ‘</xsl:for-each>’ +nl;
str += ‘
’ +nl; str += ’ <xsl:value-of select=“myid”/>’ +nl; str += ’ |
’ +nl; str += ’ <xsl:value-of select=“Name”/>’ +nl; str += ’ |
’ +nl; str += ’ <xsl:value-of select=“Surname”/>’ +nl; str += ’ |
’ +nl; str += ’ <xsl:value-of select=“Address”/>’ +nl; str += ’ |
’ +nl; str += ’ <xsl:value-of select=“City”/>’ +nl; str += ’ |
’ +nl; str += ’ <xsl:value-of select=“Telephone”/>’ +nl; str += ’ |
str += ‘’ +nl;
str += ‘’ +nl;
str += ‘</xsl:template>’ +nl;
str += ‘</xsl:stylesheet>’ +nl;
myDatabase = ‘https://darekb/tamino/database/doc’;
pageSize = 5;
var client = new TaminoClient(myDatabase, pageSize);
var x = client.query(“dok”);
var r = client.getDocument(str); ← not work
var z = x.DOM.transformNode(r.DOM);
div1.innerHTML = z;
----------------------