This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSL and xml entities that need to be translated


> <!DOCTYPE document SYSTEM "shell.dtd" [
>         <!ENTITY tmpl_logo SYSTEM "logo.xml">
>         more entities with same problem...
> ]>
> 
> for my DTD in the prologue.  The in the XML I have something like:
> 
> <shell>
>     <logo>&tmpl_logo;</logo>
>     more nodes...
> </shell>
> 
> The shell XML/XSL translation then places it in an approriate cell inside of
> a table/pagelayout
> 
> 
> logo.xml renders fine when I hit that page (it renders a simple image as a
> banner) by itself. But when I run the shell.xml it does not seem to
> translate the logo.xml.

XSL does not act on documents; it acts on node trees that are usually
derived from documents. The trees are typically constructed using logical
information about an XML document, as returned from an XML parser.

Parsers report on logical, not physical, structures (for the most part).
Entity references, when they point to parsed entities, are typically
'resolved' (swapped out with their replacement text) by the parser. There
are some occasions when references to external general entities do not
have to be resolved, but I doubt that's what's happening here.

Without knowing further details I would guess that you're either using 2
different parsers (unlikely, as you didn't say so but you're apparently
using IE 5.0 for both cases), or something is amiss with your stylesheet.
Either way, your XML is fine. Post your stylesheet and tell us what XSL
processor and XML parser you're using.

   - Mike
___________________________________________________________
Mike J. Brown, software engineer, Webb Interactive Services
XML/XSL stuff: http://www.skew.org/    http://www.webb.net/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]