I’m having problems with the following code. Code is running in web agent, browser is IE5.5
Sub Initialize
Dim s As New NotesSession
Dim xmlTr As NotesXSLTransformer
Dim xmlin As NotesStream, xslin As NotesStream, htmlout As NotesStream
Set xmlin=s.createStream
Set xslin=s.createStream
Set htmlout=s.createStream
If Not xmlin.Open("c:\dxl\roster.xml") Then
Print "Cannot open roster.xml"
Exit Sub
End If
If xmlin.Bytes = 0 Then
Print "Roster.xml does not exist or is empty"
Exit Sub
End If
If Not xslin.Open("c:\dxl\roster.xsl") Then
Print "Cannot open stylesheet"
Exit Sub
End If
If Not htmlout.Open("c:\dxl\roster.txt") Then
Messagebox "Cannot create TXT file"
Exit Sub
End If
htmlout.Truncate
'ORIGINAL ATTEMPT - WON’T WORK EITHER
’ Set xmlTr=s.CreateXSLTransformer(xmlin, xslin, htmlout)
’ Call xmlTr.process
Set xmlTr=s.CreateXSLTransformer
Print xmlTr.Transform(xmlin, xslin)
End Sub
I’ve checked printing xmlin.readtext, xslin.readtext and the original xml and xsl are being picked up fine by notes.
However, the output is only ever the stylesheet text. I’ve reduced the stylesheet to the following:
<?xml version="1.0" ?><xsl:stylesheet xmlns:xsl=“Extensible Stylesheet Language (XSL) Version 1.1” >
<xsl:template match=“/”>
Week commencing <xsl:value-of select=“QRYRESULTS/RECORD[@count=‘1’]/WORKDATE”/>
</xsl:template>
</xsl:stylesheet>
But I can’t get anything to transform.
Any suggestions would be appreciated.