xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Problem with prefixes
Date Wed, 03 May 2006 13:51:38 GMT
Not really a FOP question, is it? :-) You simply forgot to specify the
namespace URI for each SAX call, i.e. substitute the first parameter "null"
with "http://evil.org/ns" (or whatever). With the prefix alone, the SAX
consumer doesn't know about the namespace. That's one of the parts where
SAX is a bit messed up. But you get used to it. Have fun.

On 03.05.2006 15:43:26 Peter Neu wrote:
> Hello,
> 
> I'm using fop to generate documents in my webapps. Like most people
> I build a sax stream and pass it fop. Until now it worked fine but now I
> have to use "evil" namespaces. *grr*
> 
> Normally I would write tags like this: 
>   
> hd.startElement(null,"Menge","Menge",atts);
>   hd.characters(Menge[0].toCharArray(),0,Menge[0].length());
> hd.endElement(null,"Menge","Menge");
> 
> 
> Now I need to have prefixes in my tags
> 
> hd.startElement(null,"Menge","cbc:Menge",atts);
> ...
> hd.endElement(null,"Menge","cbc:Menge");
> 
> The xml document looks ok. But the xsl file can't find the tags with
> namespaces although I declared the namespace-uri's both in the original xml
> and also the xsl file.
> 
> Does anyone know what's wrong?



Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message