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

Why aren't ENTITY declarations in a main stylesheet v

Subject: Why aren't ENTITY declarations in a main stylesheet visible in the included stylesheets?
From: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jun 2022 10:51:31 -0000
 Why aren't ENTITY declarations in a main stylesheet  v
Hi Folks,

I have a "main" stylesheet that declares a bunch of entities:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet [
<!ENTITY sidPROC "'2'">
<!ENTITY starPROC "'1'">
...
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    exclude-result-prefixes="xs"
    version="3.0">

The main stylesheet xs:includes some supporting stylesheets:

    <xsl:include href="MAP-sid.xsl"/>
    <xsl:include href="MAP-star.xsl"/>

Those supporting stylesheets use the entities, e.g.,

<xsl:assert test="$TRM_PAR_row/PROC eq &sidPROC;" />

When I run SAXON on my main stylesheet I get this error:

SXXP0003  Error reported by XML parser: The entity "sidPROC" was referenced,
but not declared.

I thought that an xs:include is essentially a "macro substitution", in which
case the entity declaration should be visible, yes?

I don't want to have ENTITY declarations scattered around multiple files.
What's the best way to deal with ENTITIES?

/Roger

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.