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.
-Wick
-----Original Message-----
From: Nikolai Grigoriev [mailto:grig@renderx.com]
Sent: Wednesday, March 12, 2003 3:17 PM
To: Wick Swain
Cc: xep-support@renderx.com
Subject: Re: [xep-support] A couple of newbie questions
Hi Wick,
> 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
alias.
>
> 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
is built).
> 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.
Best regards,
Nikolai Grigoriev
RenderX
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.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