xsl-list
[Top] [All Lists]

Re: [xsl] new bie question " opening child XML files fails"

2006-12-04 19:20:22
Hi Spencer, 
that does works, but somehow it gives me another
problem, my XSL script opens only the first child xml
file, and ignore the rests. here is my revised xsl
script.
"         
<xsl:variable name="subdir"
select="document('index.xml')/protest/package/name"/>

<xsl:for-each
select="document(concat(document('index.xml')/protest/package/name,
'.xml'))/suites/suite/test">
... 
</xsl:for-each>
" 

any comments ? 


cji 


--- Spencer Tickner <spencertickner(_at_)gmail(_dot_)com> wrote:

Try

concat(document('index.xml')/protest/package/name,
'.xml')

Spencer

On 12/4/06, chun ji <cji_work(_at_)yahoo(_dot_)com> wrote:
I have an index.xml file, which reads as:
"
-<?xml version="1.0" encoding="ISO-8859-1" ?>
-<?xml-stylesheet href="rules.xsl"
type="text/xsl"?>
-<protest>
    -<package>
           -<name>billing</name>
      -</package>
     -<package>
           -<name>timecard</name>
      -</package>
-</protest>
".
There is a group of child xml files that
associated
with each "/protest/package/name", such as
"billing.xml", "timecard.xml".

Now I have soming in my XSL file that tries to
open
all these CHILD xml files,
"
<xsl:for-each


select="document(document('index.xml')/protest/package/name)">
?
</xsl:for-each>
"
which fails, because I did not give ".xml" for
each
child xml.

Does someone know the format to do it ?


thanks a lot


cji





____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited



--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--






 
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--