[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Parameterized entities?
Basically no, XML entities can not do that. More generally if you parameterize using xslt/xpath the stylesheet can be aware of that structure whereas entities are a simple pre-filter by the xml parser. Something like <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:map="http://www.w3.org/2005/xpath-functions/map" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="3.0"> <xsl:variable name="files" as="map(xs:string,document-node())"> <xsl:map> <xsl:for-each select="'arpt','nav','trm'"> <xsl:map-entry key="." select="doc(concat(.,'.xml'))"/> </xsl:for-each> </xsl:map> </xsl:variable> <xsl:template name="main"> <xsl:sequence select="'arpt is: ', $files ? arpt"/> <xsl:sequence select="'nav is: ', $files ? nav"/> <xsl:sequence select="'trm is: ', $files ? trm"/> </xsl:template> </xsl:stylesheet> Produces $ saxon -it:main en.xsl <?xml version="1.0" encoding="UTF-8"?>arpt is: <a/>nav is: <n/>trm is: <t/> given suitable input xml files On Thu, 16 Jun 2022 at 11:33, Roger L Costello <costello@mitre.org> wrote: Hi Folks,
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
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
|