[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Aw: Re: Aw: Re: Processing a list of non-xml file
So it seems to be the ?select that is failing. If I just set it to a single format *.jpg it works, adding a second format *.jpg|*.png fails.B Trying to figure out which version of Saxon is running in oxygen 26.0 as well as downloading 26.1 to see if it changes...danSent from my Verizon, Samsung Galaxy smartphone -------- Original message --------From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: 8/12/24 8:36 AM (GMT-08:00) To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Cc: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Subject: Aw:B Re: Aw:B Re: Processing a list of non-xml files in XSLT? Spaces in URIs need to be escaped--Gesendet mit der GMX Mail AppAm 12.08.24, 17:27 schrieb "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: That was a typo after testing different things. I still get the error, but now with the ? Invalid URI passed to uri-collection: file:/Users/danvint/b pubsrc/_src-data-files/b asciidoc-processing/b Ixia-Source/b dita-files/b FORMAT_sample_2_1_Early_Access_CONTENT.FormatSample2.Ping_Export_DRM.English/ b dita/out/b normal/../../?selectb =*.(jpg|gif|svg|png)b On 2024-08-12 08:07, Martin Honnen martin.honnen@xxxxxx wrote: The question mark bo8 seems to be missing before the "select" -- Gesendet mit der GMX Mail App Am 12.08.24, 17:03 schrieb "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>: Thanks, I was looking for something different for base-uri() rather than something to create the collection differently. I've change the for loop to this: <xsl:for-each select=" uri-collection($rawimagecollectionString)" > <xsl:variable name="FILE" select="substring-after(., $rawsrcPath)"/> <xsl:choose> <xsl:when test="$STRUCTURE//image[@file=$FILE]"> <!--Found <xsl:value-of select="$FILE"/>--> </xsl:when> <xsl:otherwise> <file file="{$FILE}" mode="list"/> </xsl:otherwise> </xsl:choose> </xsl:for-each> Currently my problem seems to be related to defining the uri value in uri-collection(). Trying to use the help in the Saxon docs I tried this <xsl:variable name="rawimagecollectionString" select="concat($rawsrcPath, 'select=*.(jpg|gif|svg|png)')"/> But that is failing with: Invalid URI passed to uri-collection: file:/Users/danvint/pubsrc/_src-data-files/asciidoc-processing/Ixia-So urce/dita-files/FORMAT_sample_2_1_Early_Access_CONTENT.FormatSample2.Ping_Exp ort_DRM.English/dita/out/normal/../../select=*.(jpg|gif|svg|png) The directory exists, so it seems like the problem is in forming the select portion. Note that this path is similar format as I use for a collection() uri, so I'm not sure what is the source of the problem. ..dan On 2024-08-09 14:59, Martin Honnen martin.honnen@xxxxxx wrote: > On 09/08/2024 23:52, Martin Honnen martin.honnen@xxxxxx wrote: >> >> On 09/08/2024 23:28, dvint@xxxxxxxxx wrote: >>> >>> >>> Is there anything I can use directly in XSL (this one stylesheet) >>> that >>> will just give me the filenames of these images? I can do some other >>> preprocessing stages and build an xml file with all these images >>> listed, but I would prefer to do this in this one stylesheet that is >>> doing all of this heavy lifting and decision making. >>> >> >> >> XSLT 3/XPath 3 has a function uri-collection and I think with Saxon if >> you use that function with e.g. ?select=(*.jpg|*.png) it gives you a >> sequence of file URIs to the files without the need to process the >> binary file contents. >> > > Looking at > https://www.saxonica.com/html/documentation12/sourcedocs/collections/collecti on-directories.html, > it might help Saxon if you not only provide the file suffix in the > select "parameter" behind the question mark but also the content-type > for the image file type you are looking at. > XSL-List info and archive EasyUnsubscribe (by email) XSL-List info and archive EasyUnsubscribe (by email) XSL-List info and archive EasyUnsubscribe (by email)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|