p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

ms_xsl thread: document() function..please help

Message #1 by "sundar srinivasan" <ssrinivasan3@n...> on Tue, 9 Apr 2002 22:44:48
I am populating a drop-down using an xml island (called xmlCounterParty). 
The core data is displayed from another island (called xmlmaindata). 
Obviously, one of the entries in the xmlCounterParty island is a foreign 
key in the core data's table.

I transform this way:

var objXMLDoc = CmnObjCenterDocument("xmlmaindata").XMLDocument;
var objStyle  = CmnObjCenterDocument("mystylesheet").XMLDocument;
objDiv.innerHTML = objXMLDoc.transformNode(objStyle)

The transformation workds correctly on all the core data.

The counterparty xml island is this:
<xml ID="xmlCounterParty">
	<z:row Name="Edita &amp; Co.," CPID="57" />
	<z:row Name="Morgan Stanley Capital Inc." CPID="41" />
	<z:row Name="Suntrust Equitable Securities Corp" CPID="34" />

To populate the drop-down I have the following code in the style sheet:
<td class="UPDDetail" colspan="3">
  <select name="selCPAssign" >
    <xsl:for-each select="document(xmlCounterParty)/rs:data/z:row" > 
	<option><xsl:value-of select="@Name" /></option>

This does not work. If I code as
select="document('xmlCounterParty.xml')/rs:data/z:row I get a 'access 
denied' message. Can you help?



  Return to Index