Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: using document() inside a loop to get all files in a directory

From: "Dimitre Novatchev [MVP XML]" <dnovatchev@-----.--->
To: NULL
Date: 3/2/2004 6:43:00 AM
Pass the full paths to all files as a parameter to your transformation. Then
you can access them with the document() function.


Cheers,

Dimitre Novatchev [XML MVP],
FXSL developer, XML Insider,

http://fxsl.sourceforge.net/ -- the home of FXSL
Resume: http://fxsl.sf.net/DNovatchev/Resume/Res.html


"dSchwartz" <schwartz@c...> wrote in message
news:4ae1ece2.0403011455.495fe581@p......
> What I think I'm looking for is a way (in XSL stylesheet) to get the
> contents of a directory.  How can this be accomplished?
>
> more detailed:
>
> /root
>  index.aspx
>  xsl_style.xsl
>  /xml
>   newsletter_001.xml
>   newsletter_002.xml
>   newsletter_xxx.xml
>
>
> now i want to use xsl_style.xsl to pull two attributes from the root
> element of each and every file in the xml directory.  Something like
> this:
>
> for (each file in xml AS xmlFile)
>  <xsl:value-of select="document(xmlFile)//newsletter[@title]" />
>  <xsl:value-of select="document(xmlFile)//newsletter[@date]" />
>
>
> how do i create that loop?  I have to do this without a file that
> contains a list of the files in the xml directory, so i need to
> dynamically get the contents of the xml directory!
>
> Thanks for your time




transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent