Subject: [xsl] Accessing com object hierarchy From: Dean Missikowski <dean_missikowski@xxxxxxxxx> Date: Fri, 6 Jul 2001 13:14:38 -0700 (PDT) |
Hi all, I'm using MSXML4 and .AddObject to pass a reference to a COM object to my XSLT. My com object exposes a series of objects that I'd like to access in my XSLT for example: object.getRecord("CITIZENSHIP-TABLE","CA").Description would return a string "Canadian". Here's a snippet of my XSLT: (it gives me a parse error: "expected 'eof' found '.' eoTables:GetRecord('CITIZENSHIP-TABLE','CA')-->.<--Description) <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:eoTables="urn:eoTables exclude-result-prefixes="eoTables"> <xsl:output method="html"/> <xsl:template match="CLIENT-INFO"> ... snip ... <xsl:value-of select="eoTables:getRecord('CITIZENSHIP-TABLE','CA').Description"/> ... snip ... </xsl:template> <xsl:stylesheet> and in my vb code that calls MSXML I have something like this: ... snip ... Set g_Tables = New TableEngine processor.addObject g_Tables, "urn:eoTables" processor.Transform ... snip ... Q. How do I traverse the COM object hierarchy from within the XSLT code? I've also tried something like the following but I don't knw how to reference the external object: ... snip ... <msxsl:script language="VBScript" implements prefix="tables"> Function getCodeDescription(argTable, argCode) ' I don't want to incur the overhead of ' dim o = CreateObject("TableEngine") getCodeDescription = <<unknown sytax here>>.GetRecord(argTable,argCode).Description End Function ... snip ... <xsl:value-of select="tables:getCodeDescription('CITIZENSHIP-TABLE','CA')"/> ... snip ... Any help is much appreciated. Thanks, Dean __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] A Generic template for mu, David Carlisle | Thread | [xsl] Appending spaces to the strin, Avula, Raj |
Re: [xsl] A Generic template for mu, David Carlisle | Date | RE: [xsl] result tree fragments and, Michael Kay |
Month |