Hi Paul. Paul Wellner Bou: > So why are single quotes ' within attributes replaced with their entity? > Can I prevent them from beeing replaced?
I doubt that you can prevent them from being replaced without modifying Batik. As with the issue you raised earlier, it is perfectly fine for an XML serialisation to use numeric character references and entity references like this (i.e., it’s well formed XML). In the example below, it’s true that the apostrophes need not be replaced with entities inside double-quoted attributes. I’m not sure if the serialisation code sometimes uses double-quoted attributes and sometimes single-quoted attributes; if it does, then it may use ' unconditionally just because it is simpler to do so. But if it’s usign double-quoted attributes all the time, then I agree it’s better if it didn’t use '. Can you submit a small, standalone program that demonstrates the problem? > And why is batik omitting the last character if it has to do something > with entities? For example: > > * If I try to set an attribute to ü (I did that before I knew that > all entities are replaced every time), As result I get: &#xFC. The & > is replaced with it's entity, this is ok, but the semicolon disappeared. > > * If I have single quotes in attribute values (Adobe Illustrator seems > to do this writing the font names), those single quotes are replaced > with their entity ' and the last character of the string within the > single quotes disappears: > > Original: font-family="'ArialNarrow-Bold'" > Batik written: font-family="'ArialNarrow-Bol'" > > I am using Batik-1.8pre. Is this a known bug? I don’t think that’s a known bug, no, but it does look like a bug. As above, can you provide a test case? Thanks, Cameron -- Cameron McCormack ≝ http://mcc.id.au/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
