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

XML to text - converting DITA to asciidoc

Subject: XML to text - converting DITA to asciidoc
From: "dvint@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 9 Dec 2023 18:04:07 -0000
 XML to text - converting DITA to asciidoc
I'm trying to process complex inline DITA content to text and at the same time both process inline markup and strip excess whitespace that comes from having the content in a pretty printed format.

I suppose a quick fix might be to go through and un=pretty the XML in a pre-pass. Anyone got something that does that?

Currently, I'm trying to process these files as they are in XML and make nice text blocks in the converted content. I know that normalize-space() will strip the space from text, but it doesn't allow processing of the markup at the same time.

So if I have a call like

<xsl:apply-templates/>

I get this when processing an <li>

======
* link:lnu1689300505181.dita[Step
					3]

* link:txr1689300527868.dita[Step
						4]

* Complete!





* link:fkt1688690571816.dita[Show me the primary landing
							page]

* link:fto1689306405929.dita[Show me
							tiles without descriptions]







* link:https://example.com[Sample app]




* link:https://example.com[Security Key]

======

If I change that call to

<xsl:apply-templates select="normalize-space(.)"/>

I get clean text, but now I'm missing the processing of the inline elements like these <xref>s

=========

* Step 3

* Step 4

* Complete!





* Show me the primary landing page
* Show me tiles without descriptions





* Sample app


* Security Key


===========

I've confirmed that deleting the whitespace is one possible way to correct this problem, just wondering if there is something else I can try.

..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.