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

why document() doesn't work

Subject: why document() doesn't work
From: "PETER WU" <peter.wu@xxxxxxxxxxxxxxx>
Date: Mon, 24 Nov 2003 12:58:04 -0600
peter wu

Hi,
Please help (I couldn't find the answer to my problem from "FAQ").
Here's my document list xml file:

<?xml version="1.0" encoding="utf-8"?>
<EntryPoint>
  <nFundOperation filename="FSUSA00386.xml" />
  <nShareClassOperation filename="FSUSA00386-FOUSA00H0A.xml" />
  <nAnnualReport filename="FSUSA00386-FOUSA00H0A.xml" />
  <nFundAnnualReport filename="FSUSA00386.xml" />
  <nPortfolio filename="FSUSA00386-554834.xml" />
  <nTrailingPerformance filename="FSUSA00386-FOUSA00H0A.xml" />
  <nHistoricalPerformance filename="FSUSA00386-FOUSA00H0A.xml" />
</EntryPoint>

and one of the source file is FSUSA00386-FOUSA00H0A.xml (for the node nAnnualReport):

<?xml version="1.0" encoding="utf-8"?>
<AnnualReport _Id="FOUSA00H0A">
 <Date>2002-12-31</Date>
 <FeeAndExpense>
  <NetIncomeRatio>-0.56</NetIncomeRatio>
  <GrossExpenseRatio>1.37</GrossExpenseRatio>
  <NetExpenseRatio>1.34</NetExpenseRatio>
  <ExpenseComponent/>
 </FeeAndExpense>
 <Financials>
  <UnrealizedCapitalGain>-2296992.72940</UnrealizedCapitalGain>
  <RealizedCapitalGain>-36189245.28209</RealizedCapitalGain>
  <CapitalLossCarryForward>35329604.10751</CapitalLossCarryForward>
  <NetAssets>37203270</NetAssets>
 </Financials>
</AnnualReport>

Here's partial of xsl:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet   version="1.0"   xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--xsl:include href="AnnualReport.xsl" /-->
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
 <xsl:template match="/">
  <XML15C>
   <xsl:apply-templates select="//nAnnualReport"/>
  </XML15C>
 </xsl:template>
 
 <xsl:template match="nAnnualReport">
  <xsl:copy-of select="document(@filename)//Date"/>
 </xsl:template>
 
</xsl:stylesheet

In the output I only got <XML15C /> while I expect <XML15C>2002-12-31</XML15C>.
I tried many ways to output the some source info in the FSUSA00386-FOUSA00H0A.xml without success. 
It seems document() doesn't work at all. I can't figure out what's wrong.
Many thanks in advance.
Peter

 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.