List Info

Thread: Re: Updates on Style Handling in odf4j




Re: Updates on Style Handling in odf4j
user name
2007-07-31 04:53:06
Hi Amit,

The Style.java code that you sent will always get the style
information 
for the style named P1. You ignore the style name
parameter.

What about the style factory? We discussed that the factory
is 
responsible for finding the nodes representing the styles in
sytles.xml 
and content.xml (which are available from the package
object)

Consequently, the Style object should be initialized with
the style node 
provided by the factory. The factory must also take care
about not 
creating multiple instances of style objects for the same
node.

/Lars

Amit krishna Saha wrote:
> Hi Lars,
> 
> I feel I have made some good progress with the style
handling. The
> class "Style.java" successfully dumps the
style information. There has
> also been some modifications in
"Element.java" and "OdtToText2.java".
> All of them are attached.
> 
> However there are some glitches which has to be cleared
and require
> your help. They are:
> 
> 1. How can I get access to the current
"content.xml"? [for the purpose
> of testing my code, please put the
"content.xml"  in the
> "test"  directory. I apologize for that.]
> 
> 2. As you will observe I am using a "fixed"
style name for XPath
> query. How can I use a Java variable (style_name in
Style.java) in my
> Xpath query?
> 
> 3. Also please comment on the code organization.
> 
> Let me know your comments so that I can start with the
modification of
> the Document Explorer.
> 
> Regards & Thanks
> 
> 
> 
>
------------------------------------------------------------
------------
> 
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: dev-unsubscribeodftoolkit.openoffice.org
> For additional commands, e-mail: dev-helpodftoolkit.openoffice.org

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeodftoolkit.openoffice.org
For additional commands, e-mail: dev-helpodftoolkit.openoffice.org


Re: Updates on Style Handling in odf4j
user name
2007-07-31 08:25:58
Hi Lars, Bernd

I have taken care of your suggestions and have rewritten
and
restructured the code.

Please find the updated files:

1. Element.java
2. Style.java
3. StyleFactory.java

The "OdtToText2.java" remains unchanged.

I am still working with only the "content.xml"
file. Regarding this I
am yet to figure out how I can access the
"content.xml" of the present
document. As per the code organization now, I shall need a
reference
to the "content.xml" in the file
"StyleFactory.java" where I do the
XPath stuff.

Please let me know your comments

Regards
-- 
Amit krishna Saha
[URL]:http://amitsaha.in
.googlepages.com

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeodftoolkit.openoffice.org
For additional commands, e-mail: dev-helpodftoolkit.openoffice.org
  
  
  
  
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )