From: Wick Swain (WSwain@nutracorp.com)
Date: Thu Mar 13 2003 - 14:26:41 PST
Thank you for your insight. I am good to go now.
My application does use an in memory DOM and that DOES allow me to
proceed without an "fo:" alias. It was only when I tried to use the
sample program "DOMInput.java" that this was an issue. This program
parses a dom from a file, which in practice should not happen (based on
your explanation of the advantages of using SAX when the source comes
from a file) so I am good to go. Thanks again for your help.
From: Nikolai Grigoriev [mailto:firstname.lastname@example.org]
Sent: Wednesday, March 12, 2003 3:17 PM
To: Wick Swain
Subject: Re: [xep-support] A couple of newbie questions
> In case it matters, I am using the
> com.renderx.xep.Driver.render(Document, String)
> method when this behavior occurs
A general comment: SAX-based interfaces are more natural
for XEP, more efficient, and less subject to problems like
yours. DOM interfaces for XEP are secondary, derived
from SAX ones using a tree walker. If you are using XEP
to process data from a file, then SAX is definitely the
recommended option. DOM is only useful when you
construct document trees directly in memory.
> 1. Using the server version I am now forced to use the "fo:" namespace
> For example, I originally specified
> <root xmlns=http://www.w3.org/1999/XSL/Format>
> But I am now forced to specify
> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
> and place fo: in front of all of my tags
The same parser is used by default in the evaluation version
and in the server one (unless you reset it to something different).
However, all command-line tools use SAX-based interfaces,
not DOM-based ones.
Looks like your parser does not convey namespace
information to the DOM tree if the prefix is empty.
How do you construct your DOM tree object?
Which DOM implementation are you using?
(Note that the resolution of this problem is outside
XEP scope: we cannot control the way DOM object
> 2. Any image files I refer to in my .fo document assume
> a default directory of %XEP_HOME%. As I watch the
> output from the renderer it is specifying a system-id
> of %XEP_HOME%\DOM.source. How do I specify
> a different system-id?
DOM sources cannot have a system ID, so XEP uses a
default directory (specified in BASE option) for all
relative URLs. You can set this directory to anything
you want, by specifying Java system property
com.renderx.xep.BASE or adding a record to etc/xep.xml
configuration file. Please refer to the User Guide
for more information about XEP options.
BTW: SAX input doesn't have this problem: information
about file location is preserved in the System ID, and all
relative URLs can be correctly resolved with respect
to the actual file location.
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to email@example.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Thu Mar 13 2003 - 14:22:00 PST