xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sam Fuqua <samfu...@gmail.com>
Subject Re: Problems with DOMSource
Date Mon, 06 Apr 2009 16:23:55 GMT
Andreas,

Yes, I believe you're right, which would explain it not working from the
DOM, while it would work from the String.
I currently have:

Node contentNode = printFeed.createElement("fo:block");

where I attach generated FO to contentNode.  How would you recommend doing
the proper namespacing?
Just for more information, printFeed is a Document created from reading an
FO file that has all of the proper namespacing in it.  It is from a
namespace-aware DocumentFactory.

Sam

On Mon, Apr 6, 2009 at 12:13 PM, Andreas Delmelle <
andreas.delmelle@telenet.be> wrote:

> On 06 Apr 2009, at 13:36, Sam Fuqua wrote:
>
> Hi
>
>  I'm using fop .94.  I'm reading in a .fo file, which is then manipulated
>> by adding more fo that is generated to the flow "xsl-region-body".  When I
>> try to transform the DOMSource, I get two errors: that the root node is not
>> a valid root node and that it must be "fo:root", and that "fo:block" is not
>> a valid child of "block".  However, if I turn the DOMSource into a string,
>> everything works fine and I get no errors.  I really need to use as
>> DOMSource rather than a string, though.  Has anybody had a similar problem?
>>
>
> Yes, in another (non-FO) context. Most likely this is related to
> namespaces. Are you adding the elements in the correct namespace, or do you
> just add the 'fo:' prefix and expect that this will magically take care of
> putting the node in the correct namespace?
> In the latter case, tough luck, I'm afraid. You have to take care that the
> additional nodes are added with the correct namespace /URI/ (the prefix
> should be irrelevant).
>
> HTH!
>
> Andreas
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>


-- 
Sam Fuqua
ΣΝ ΘΗ 454

Mime
View raw message