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

Re: Processing a list of non-xml files in XSLT?

Subject: Re: Processing a list of non-xml files in XSLT?
From: "Martin Honnen martin.honnen@xxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Aug 2024 21:51:50 -0000
Re:  Processing a list of non-xml files in XSLT?
On 09/08/2024 23:28, dvint@xxxxxxxxx wrote:
I've created a conversion process to take DITA to asciidoc that works
pretty well overall. What I have is:
- a folder with all the dita, ditamaps, and images in a flat structure
- a simplified format of the map as run through the normalize process

I use the simplified map to determine what files and how they should
be organized in the final output. This map also contains information
about images, xrefs and conref content (linked to content).

My problem is that the simplified map is based upon files that are in
the TOC. We have some situations where the writer has referenced
topics that are not in the TOC.

I want to run a list of all the dita files as a collection and another
list of images as a collection so I can compare these to the entries
in the map. The process works well for the dita content with this:



I'm shifting to the images and tried to use the same configuration for
images. Problem is that base-uri() wants an XML file

The required item type of the first argument of fn:base-uri() is
node(); the supplied value xs:base64Binary("") is an atomic value

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.

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.