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

Re: Java list extension

Subject: Re: Java list extension
From: Michel Hendriksen <michel.hendriksen@xxxxx>
Date: Tue, 5 Jul 2011 14:40:13 +0200
Re:  Java list extension
select=*.(xml|xsl) maybe then

Check also http://www.xmlplease.com/collection for samples



On Tue, Jul 5, 2011 at 2:23 PM, Hermann Stamm-Wilbrandt
<STAMMW@xxxxxxxxxx> wrote:
>> probeer select=*.xml
>
> thanks, but that would miss "*.xsl".
>
> And the question I would like to get answered is, whether it is possible
> in
> XSLT 2 (or XSLT 3) to get the names of Non-XML files by the stylesheet,
> too.
>
>
> Mit besten Gruessen / Best wishes,
>
> Hermann Stamm-Wilbrandt
> Developer, XML Compiler, L3
> Fixpack team lead
> WebSphere DataPower SOA Appliances
> https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
> ----------------------------------------------------------------------
> IBM Deutschland Research & Development GmbH
> Vorsitzender des Aufsichtsrats: Martin Jetter
> Geschaeftsfuehrung: Dirk Wittkopp
> Sitz der Gesellschaft: Boeblingen
> Registergericht: Amtsgericht Stuttgart, HRB 243294
>
>
>
> From:   Michel Hendriksen <michel.hendriksen@xxxxx>
> To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Date:   07/05/2011 02:16 PM
> Subject:        Re:  Java list extension
>
>
>
> probeer select=*.xml
>
> On Tue, Jul 5, 2011 at 2:14 PM, Michel Hendriksen
> <michel.hendriksen@xxxxx> wrote:
>>
>> probeer select=*.xml
>>
>> On Tue, Jul 5, 2011 at 2:09 PM, Hermann Stamm-Wilbrandt
> <STAMMW@xxxxxxxxxx> wrote:
>>>
>>> Andew,
>>>
>>> > You can get a list of all the files in the directory and
>>> > subdirectories by doing:
>>>
>>> > <xsl:for-each
>>>
>
select="collection('file:///path/to/dir/?select=*;recurse=yes;on-error=ignore
')">
>>> >   <xsl:value-of select="document-uri(.)"/>
>>>
>>> how can you get the names of non-XML files?
>>> Saxon reports errors for applying document-uri() to Non-XML files.
>>>
>>> [stammw@br8ggx73 xslt20]$ ll
>>> total 12
>>> -rw-rw-r-- 1 stammw stammw 403 Jul  5 14:04 ls.xsl
>>> -rw-rw-r-- 1 stammw stammw   5 Jul  5 14:03 some.xml
>>> -rw-rw-r-- 1 stammw stammw   4 Jul  5 14:04 tst.txt
>>> [stammw@br8ggx73 xslt20]$
>>> [stammw@br8ggx73 xslt20]$ saxon ls.xsl some.xml
>>> Error on line 1 column 1 of tst.txt:
>>>  SXXP0003: Error reported by XML parser: Content is not allowed in
>>> prolog.
>>> file:/home/stammw/xslt/xslt20/ls.xsl
>>> file:/home/stammw/xslt/xslt20/some.xml
>>> [stammw@br8ggx73 xslt20]$
>>> [stammw@br8ggx73 xslt20]$ cat ls.xsl
>>> <xsl:stylesheet version="2.0"
>>>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>> >
>>>  <xsl:output omit-xml-declaration="yes" />
>>>
>>>  <xsl:template match="/">
>>>    <xsl:for-each
>>>
>
select="collection('file:///home/stammw/xslt/xslt20/?select=*;recurse=yes;on-
error=ignore')">
>>>      <xsl:value-of select="document-uri(.)"/><xsl:text>&#10;</xsl:text>
>>>    </xsl:for-each>
>>>  </xsl:template>
>>>
>>> </xsl:stylesheet>
>>> [stammw@br8ggx73 xslt20]$
>>>
>>>
>>> Mit besten Gruessen / Best wishes,
>>>
>>> Hermann Stamm-Wilbrandt
>>> Developer, XML Compiler, L3
>>> Fixpack team lead
>>> WebSphere DataPower SOA Appliances
>>> https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/
>>> ----------------------------------------------------------------------
>>> IBM Deutschland Research & Development GmbH
>>> Vorsitzender des Aufsichtsrats: Martin Jetter
>>> Geschaeftsfuehrung: Dirk Wittkopp
>>> Sitz der Gesellschaft: Boeblingen
>>> Registergericht: Amtsgericht Stuttgart, HRB 243294
>>>
>>>
>>>
>>> From:   Andrew Welch <andrew.j.welch@xxxxxxxxx>
>>> To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx
>>> Date:   07/05/2011 10:15 AM
>>> Subject:        Re:  Java list extension
>>>
>>>
>>>
>>> > Now I need a way to discover the contents of a directory (files and
>>> > other directorys). So far I have:
>>>
>>> You can get a list of all the files in the directory and
>>> subdirectories by doing:
>>>
>>> <xsl:for-each
>>>
>
select="collection('file:///path/to/dir/?select=*;recurse=yes;on-error=ignore
')">
>>>  <xsl:value-of select="document-uri(.)"/>
>>>
>>>
>>> --
>>> Andrew Welch
>>> http://andrewjwelch.com

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.