Hi Sergiu, > In any case, I will have to parse the in-line style attribute string to > > filter those style directives that are not necessary. The complete > grammar > > for in-line style attributes seems to be a bit complicated to be hand > > crafted (http://www.w3.org/TR/css-style-attr) although in OpenOffice > > converted documents i have only seen the "key:value;key:value" format. > What > > should be the correct approach to parse the style attribute string ? > > > > Thank you very much for your ideas. :) > > All cases can be covered by using a CSS library. We already use css4j in > the export (pdf) implementation, and although it has several > limitations, this library is a good starting point. Vincent, could you > put the latest release (0.10) in our externals? There have been lots of > changes since 0.4, which would also help our PDF export.
Thank you for this input. I think css4j is a good option. One more question, will it be a good idea to maintain a list of allowed css properties for each element we are interested in ? So that we can filter out everything else ? By list I meant a comma separated string of allowed properties like "font-family,font-size,font-weight". And then we can use the String.indexOf() method for the search... WDYT ? I'm asking these specific questions to make sure that I don't introduce any performance hogs :) Thanks. - Asiri > > -- > Sergiu Dumitriu > http://purl.org/net/sergiu/ > _______________________________________________ > devs mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/devs > _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

