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

Processing a list of non-xml files in XSLT?

Subject: Processing a list of non-xml files in XSLT?
From: "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 9 Aug 2024 21:27:49 -0000
 Processing a list of non-xml files in XSLT?
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:

<xsl:variable name="rawditacollectionString"
		select="concat($rawsrcPath, '?select=(*.dita|*.xml)')"/>

<xsl:for-each-group select=" $STRUCTURE//xref" group-by="@file">
<!-- Match each XREF to a TOPIC entry in $STRUTURE, if no match, it is an
orphan -->
<xsl:variable name="FILE" select="current-grouping-key()"/>


	<xsl:choose>
		<xsl:when test="$STRUCTURE//topic[@file=$FILE]">
			<!--Found <xsl:value-of select="$FILE"/>-->
		</xsl:when>
		<xsl:otherwise>
			<file file="{$FILE}"/>
		</xsl:otherwise>
	</xsl:choose>
</xsl:for-each-group>

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.

..dan

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.