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

Re: How to use ENTITY declarations and references?

Subject: Re: How to use ENTITY declarations and references?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 5 May 1999 10:35:08 +0100 (BST)
use entity
> 1. If you declare an entity, shouldn't the XSL document have access to those
> entities? XT seems to think so, but LotusXSL differs.

The document will be parsed as XML so at that point the entities will be
recognised and expanded and, in this case, the character data will
go into the text node. The XSL processor itself won't know whether
you entered the character via an entity or by direct character input.

> 2. Why the &cent; in the output from XT?

You specified that your result tree should use the HTML4 namespace.
XSL processors can (and xt does) use the result tree namespace to
control the way in which the result tree is linearised. In this case
the result tree is not linearised as XML; it is written out as HTML.
Hence it gets a DOCTYPE declaration and then xt chooses to write
out certain characters as entities. Note it does this just because
the character is in a text node in the result tree. The character may
come from the stylesheet or the source document, and may or may not have
been entered as an entity, that does not matter.

> 3. Are the parsers simply looking for specific URIs when they determine
> whether the namespace declarations are valid? Is this really necessary?

Not sure what you mean. If the namespace declaration is syntactically
correct then it is valid. The processor does not try to look up that
URL. The processors may `know' certain namespaces and take special
action, here xt recognises the html4 namespace.

> 4. Where is the <!DOCTYPE> coming from in the output?
because you asked the result tree be written out as HTML4.

> And then if I change the stylesheet to use this (now invalid) namespace URI
> so that XT will parse it...
>   xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"

Why do you say (now invalid)? That is the correct namespace for the
current draft of XSL. The one you changed from is the namespace for the
`now invalid' earlier drafts.


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

Current Thread


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.
First Name
Last Name
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.