[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Accessing com object hierarchy

Subject: Accessing com object hierarchy
From: Dean Missikowski <dean_missikowski@xxxxxxxxx>
Date: Fri, 6 Jul 2001 13:14:38 -0700 (PDT)
threads accessing com object
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.