Hi Raja,
I does not understand the deeper workflow of your stylesheet, but:
"""
<xsl:apply-templates
select="document(/Envelope/Part/@File)/Document/AddressPage/BillAcc"
mode="FORMHDR"/>
"""
You iterate over *every* File in your envelope and process the
"BillAcc"-Element.
"""
<xsl:template match="/Document/AddressPage/BillAcc" mode="FORMHDR">
<xsl:value-of
select="document(/Envelope/Part/@File)/Document/Invoice/[EMAIL
PROTECTED]'INV']/@Date"/>&sep;
</xsl:template>
"""
When you are in your INV-File you are trying to iterate again over your
envelope file???
This is something you can't do (I am wondering why it should work with
Xalan-J), because the root of your document is the root of the
INV-Document. Is it really possible with Xalan-J?
Once you are within your INV-Document, you can't break out to your main
envelope document (hopefully I am right at this point).
Eg you can (it depends on your wanted logic):
"""
<xsl:template name="createAccess">
<xsl:for-each select="/Envelope/Part">
<xsl:apply-templates select="document(@File)/*"
mode="FORMHDR"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="/Document/Invoice/[EMAIL PROTECTED]'INV']" mode="FORMHDR">
<xsl:value-of select="@Date"/>&sep;
</xsl:template>
"""
Iterate over every part, process the elements of your part and write
templates for special structures within your parts.
Holger
Sathasivam, Elayaraja schrieb:
Hi,
I am using Xalan-C with XSL1.0.
Command: $ xalan ForumXML.xml ForumXSL.xsl
Actual Output: | ???????????????????????
Expected Output: 20080428| ( If I run in Xalan-J its working fine, why
not in Xalan-C ????????????? )
XSLT processor: Xalan-C_1_10_0-win32-msvc_60, xerces-c-windows_2000-msvc_60
Find the input xml file and the xsl file,
ForumXML.xml
------------------------
<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
<Part File='INV24.2302.xml' LinkType='REL' DocType='INV' Format='XML'/>
<Part File='ADDR24.2302.xml' LinkType='REL' DocType='ADD' Format='XML'/>
</Envelope>
ForumXSL.xsl
-----------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY space "<xsl:text> </xsl:text>">
<!ENTITY tab "<xsl:text>	</xsl:text>">
<!ENTITY sep "<xsl:text>|</xsl:text>">
<!ENTITY cr "<xsl:text>
</xsl:text>">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xalan="http://xml.apache.org/xalan" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:call-template name="createAccess"/>
</xsl:template>
<xsl:template name="createAccess">
<xsl:apply-templates
select="document(/Envelope/Part/@File)/Document/AddressPage/BillAcc"
mode="FORMHDR"/>
</xsl:template>
<xsl:template match="/Document/AddressPage/BillAcc" mode="FORMHDR">
<xsl:value-of
select="document(/Envelope/Part/@File)/Document/Invoice/[EMAIL PROTECTED]'INV']/@Date"/>&sep;
</xsl:template>
</xsl:stylesheet>
INV24.2302.xml
-----------------------
<?xml version='1.0' encoding="UTF-8"?>
<Document>
<Invoice>
<Date Type="INV" Date="20080428"/>
<Date Type="START" Date="20060101" />
</Invoice>
</Document>
ADDR24.2302.xml
------------------------------
<?xml version='1.0' encoding="UTF-8"?>
<Document>
<AddressPage xml:lang="EN">
<BillAcc>
<Customer Id="1.85" SocSecNo="" DrivLicNo=""/>
</BillAcc>
</AddressPage>
</Document>
Regards,
Raja
--
holger floerke d o c t r o n i c
email [EMAIL PROTECTED] information publishing + retrieval
phone +49 228 92 682 00 http://www.doctronic.de
doctronic GmbH & Co. KG, Sitz: Bonn, HRA 4685 AG Bonn
Ust-IdNr.: DE 210 898 186, Komplementaerin:
doctronic Verwaltungsgesellschaft mbH, Sitz: Bonn, HRB 8926 AG Bonn
Geschaeftsfuehrer: Holger Floerke, Carsten Oberscheid, Ingo Kueper
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]