You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Sc...@lotus.com on 2000/09/12 03:26:36 UTC
Re: Problem with Xalan1 and namespaces
It was creating the source tree, but did not process the namespaces as part
of it's construction (Xerces normally does that). I don't want to add this
feature to Xalan 1, so I defaulted to not using the Xerces namespace
processing in this case, but instead default to my DOM default namespace
processing. This is more expensive than having it done inside the DOM,
but...
This requires a code change, unfortunately, to Xalan, which I have checked
in. I tried to find a workaround, but came up empty.
Cocoon2 should make the leap to Xalan2, IMHO. I can't promise that you
won't come up with bugs, but at least we'll be rolling forwards, instead of
patching backwards. For every bug that we have it fix or diagnose in
Xalan1, it takes away from progress of Xalan2.
-scott
Giacomo Pati
<Giacomo.Pati To: cocoon-dev@xml.apache.org
@pwr.ch> cc: (bcc: Scott Boag/CAM/Lotus)
Sent by: Subject: Re: Problem with Xalan1 and namespaces
giacomo@lotus
.com
09/11/2000
04:09 PM
Please
respond to
cocoon-dev
Hi Scott
There is an xml document in cocoon2-base/webapp/sitemap.xmap and a
stylesheet in
cocoo2-base/webapp/stylesheets/sitemap/simple-sitemap2html.xsl.
It transformes well on the command line but not when it is fed in as a
SAX2 stream (IMHO).
Giacomo
Scott_Boag@lotus.com wrote:
>
> Can you give me a pointer to where I can find the stylesheet that is
used?
> From the message, I can't tell very much about what the bug is, how to
> reproduce it, and how to diagnose the problem.
>
> > Anyway, I wanted to use Xalan2 instead of Xalan1, can you give us an
> > update on its usability/functionality/stability?
>
> It's getting there, though were working on an issue now with DOM-to-DOM
> conversions that might be a show-stopper for you. There are also some
> things with extensions that might be problematic. Out of 1200
conformance
> tests we still have about 200 fails. xml-stylesheet and fragment
handling
> is not fully implemented yet.
>
> My advice would be to go ahead and integrate, and then scream when things
> don't work. The squeaky wheel gets the grease. And it would help us to
> have you guys up and running, in order to better know where we fall
short.
>
> My biggest priority this week is to get performance measurements going.
>
> -scott
>
>
> Stefano
> Mazzocchi To: Scott Boag
<Sc...@lotus.com>
> <stefano@apac cc:
cocoon-dev@xml.apache.org
> he.org> Subject: Problem with Xalan1
and namespaces
>
> 09/11/2000
> 07:54 AM
>
>
>
> Scott,
>
> we are having problems with latest Xalan released and namespaces, could
> you give us a hand identifying the problem?
>
> With XT it works no problem so either it's a problem with Xalan or it's
> a problem with the wrapper/liaison that we wrote in Cocoon2.
>
> Anyway, I wanted to use Xalan2 instead of Xalan1, can you give us an
> update on its usability/functionality/stability?
>
> TIA
>
> Nicola Ken Barozzi wrote:
>
> > > First of all, the exmple should work too, but it doesn't, so it seems
> we have
> > > a bug here.
> > > If I call the process method in the XalanTransformer to System.out
> instead of
> > > returning the DocumentHandler, it works!
> > >
> > > processor.process(new XSLTInputSource("foo.xml"),
> > > style,
> > > new XSLTResultTarget(System.out));
> > >
> > > (I called the test sitemap foo.xml)
> > >
> > > So it seems that namespace uri is stripped off if transformation is
> giuded by
> > > external sax but not using the process method.
> >
> > Maybe I have something.
> > In class StylesheetRoot (xalan) method
> > public void process( XSLTProcessor iprocessor, Node sourceTree,
> > XSLTResultTarget outputTarget)
> > (called by all other process in same class and processors)
> > I found this note:
> >
> > // Needs work: We have to put the extension namespaces
> > // into the liaison's table. We wouldn't have to do this
> > // if the stylesheet handled it's own extensions, which
> > // I'll fix on a later date.
> > Enumeration keys = m_extensionNamespaces.keys();
> > while(keys.hasMoreElements())
> > {
> > Object key = keys.nextElement();
> > // System.out.println("Putting ext namespace: "+key);
> > processor.getExecContext().addExtensionNamespace
((String)key,
> >
> (ExtensionFunctionHandler)m_extensionNamespaces.get(key));
> > }
> >
> > Maybe I'm wrong, but it seems that namespaces are truly set-up only by
> this
> > method, hence the problem when directly starting it all via SAX.
>
> --
> Stefano Mazzocchi One must still have chaos in oneself to be
> able to give birth to a dancing star.
> <st...@apache.org> Friedrich Nietzsche
> --------------------------------------------------------------------
> Missed us in Orlando? Make it up with ApacheCON Europe in London!
> ------------------------- http://ApacheCon.Com ---------------------
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen Mailto:Giacomo.Pati@pwr.ch
Web: http://www.pwr.ch
Re: Problem with Xalan1 and namespaces
Posted by Giacomo Pati <Gi...@pwr.ch>.
Scott_Boag@lotus.com wrote:
>
> It was creating the source tree, but did not process the namespaces as part
> of it's construction (Xerces normally does that). I don't want to add this
> feature to Xalan 1, so I defaulted to not using the Xerces namespace
> processing in this case, but instead default to my DOM default namespace
> processing. This is more expensive than having it done inside the DOM,
> but...
>
> This requires a code change, unfortunately, to Xalan, which I have checked
> in. I tried to find a workaround, but came up empty.
>
> Cocoon2 should make the leap to Xalan2, IMHO. I can't promise that you
> won't come up with bugs, but at least we'll be rolling forwards, instead of
> patching backwards. For every bug that we have it fix or diagnose in
> Xalan1, it takes away from progress of Xalan2.
Thanks, Scott. That's ok for me. So we try to make a Xalan2 a base for
C2. There is not only the XalanTransformer, there is also the XSP engine
which makes heavily use of it and if I remember well the API of Xalan2
is different than that of Xalan1 (trax).
I remember Sean Timm having done some work toward Xalan2 in C2. Are you
still on the list, Sean? Have you a status about your work?
Giacomo
>
> -scott
>
>
> Giacomo Pati
> <Giacomo.Pati To: cocoon-dev@xml.apache.org
> @pwr.ch> cc: (bcc: Scott Boag/CAM/Lotus)
> Sent by: Subject: Re: Problem with Xalan1 and namespaces
> giacomo@lotus
> .com
>
>
> 09/11/2000
> 04:09 PM
> Please
> respond to
> cocoon-dev
>
>
>
> Hi Scott
>
> There is an xml document in cocoon2-base/webapp/sitemap.xmap and a
> stylesheet in
> cocoo2-base/webapp/stylesheets/sitemap/simple-sitemap2html.xsl.
>
> It transformes well on the command line but not when it is fed in as a
> SAX2 stream (IMHO).
>
> Giacomo
>
> Scott_Boag@lotus.com wrote:
> >
> > Can you give me a pointer to where I can find the stylesheet that is
> used?
> > From the message, I can't tell very much about what the bug is, how to
> > reproduce it, and how to diagnose the problem.
> >
> > > Anyway, I wanted to use Xalan2 instead of Xalan1, can you give us an
> > > update on its usability/functionality/stability?
> >
> > It's getting there, though were working on an issue now with DOM-to-DOM
> > conversions that might be a show-stopper for you. There are also some
> > things with extensions that might be problematic. Out of 1200
> conformance
> > tests we still have about 200 fails. xml-stylesheet and fragment
> handling
> > is not fully implemented yet.
> >
> > My advice would be to go ahead and integrate, and then scream when things
> > don't work. The squeaky wheel gets the grease. And it would help us to
> > have you guys up and running, in order to better know where we fall
> short.
> >
> > My biggest priority this week is to get performance measurements going.
> >
> > -scott
> >
> >
> > Stefano
> > Mazzocchi To: Scott Boag
> <Sc...@lotus.com>
> > <stefano@apac cc:
> cocoon-dev@xml.apache.org
> > he.org> Subject: Problem with Xalan1
> and namespaces
> >
> > 09/11/2000
> > 07:54 AM
> >
> >
> >
> > Scott,
> >
> > we are having problems with latest Xalan released and namespaces, could
> > you give us a hand identifying the problem?
> >
> > With XT it works no problem so either it's a problem with Xalan or it's
> > a problem with the wrapper/liaison that we wrote in Cocoon2.
> >
> > Anyway, I wanted to use Xalan2 instead of Xalan1, can you give us an
> > update on its usability/functionality/stability?
> >
> > TIA
> >
> > Nicola Ken Barozzi wrote:
> >
> > > > First of all, the exmple should work too, but it doesn't, so it seems
> > we have
> > > > a bug here.
> > > > If I call the process method in the XalanTransformer to System.out
> > instead of
> > > > returning the DocumentHandler, it works!
> > > >
> > > > processor.process(new XSLTInputSource("foo.xml"),
> > > > style,
> > > > new XSLTResultTarget(System.out));
> > > >
> > > > (I called the test sitemap foo.xml)
> > > >
> > > > So it seems that namespace uri is stripped off if transformation is
> > giuded by
> > > > external sax but not using the process method.
> > >
> > > Maybe I have something.
> > > In class StylesheetRoot (xalan) method
> > > public void process( XSLTProcessor iprocessor, Node sourceTree,
> > > XSLTResultTarget outputTarget)
> > > (called by all other process in same class and processors)
> > > I found this note:
> > >
> > > // Needs work: We have to put the extension namespaces
> > > // into the liaison's table. We wouldn't have to do this
> > > // if the stylesheet handled it's own extensions, which
> > > // I'll fix on a later date.
> > > Enumeration keys = m_extensionNamespaces.keys();
> > > while(keys.hasMoreElements())
> > > {
> > > Object key = keys.nextElement();
> > > // System.out.println("Putting ext namespace: "+key);
> > > processor.getExecContext().addExtensionNamespace
> ((String)key,
> > >
> > (ExtensionFunctionHandler)m_extensionNamespaces.get(key));
> > > }
> > >
> > > Maybe I'm wrong, but it seems that namespaces are truly set-up only by
> > this
> > > method, hence the problem when directly starting it all via SAX.
> >
> > --
> > Stefano Mazzocchi One must still have chaos in oneself to be
> > able to give birth to a dancing star.
> > <st...@apache.org> Friedrich Nietzsche
> > --------------------------------------------------------------------
> > Missed us in Orlando? Make it up with ApacheCON Europe in London!
> > ------------------------- http://ApacheCon.Com ---------------------
>
> --
> PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
> Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
> Hintereichenstrasse 7 Mobil: +41 (0)78 759 7703
> CH-8166 Niederweningen Mailto:Giacomo.Pati@pwr.ch
> Web: http://www.pwr.ch
--
PWR GmbH, Organisation & Entwicklung Tel: +41 (0)1 856 2202
Giacomo Pati, CTO/CEO Fax: +41 (0)1 856 2201
Hintereichenstrasse 7 Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen Mailto:Giacomo.Pati@pwr.ch
Web: http://www.pwr.ch
Problem with Cocoon and namespace
Posted by Anouk Udressy <ud...@freesurf.ch>.
Hi,
I would like to use Cocoon for transform XML file to WML and display the
result with the Nokia Developpement toolkit.
My problem is the following :
When I use namespaces in my XSL file*, the Nokia developpement toolkit
display the following error :
"Attribute is not declared". Then, I can modifiy the source directly in the
NDK, I remove all the name space** and it's work !
* like this :
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:lng="http://toto.com/languages/1.0"
xmlns:lnk="http://toto.com/links/1.0"
xmlns:trl="http://toto.com/translations/1.0">
** like this II :
<wml xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:lng="http://toto.com/languages/1.0"
xmlns:lnk="http://toto.com/links/1.0"
xmlns:trl="http://toto.com/translations/1.0">
become
<wml>
If I remove the namespace directly in the XSL file, the Nokia Developpement
toolkit display the following error : "MIME type text/html is not
supported".
Remark : I use Xalan 1.2.
What can I do ?
Thanks in advance,
Anouk
Problem with Cocoon and namespace
Posted by Anouk Udressy <ud...@freesurf.ch>.
Hi,
I would like to use Cocoon for transform XML file to WML and display the
result with the Nokia Developpement toolkit.
My problem is the following :
When I use namespaces in my XSL file*, the Nokia developpement toolkit
display the following error :
"Attribute is not declared". Then, I can modifiy the source directly in the
NDK, I remove all the name space** and it's work !
* like this :
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:lng="http://toto.com/languages/1.0"
xmlns:lnk="http://toto.com/links/1.0"
xmlns:trl="http://toto.com/translations/1.0">
** like this II :
<wml xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:lng="http://toto.com/languages/1.0"
xmlns:lnk="http://toto.com/links/1.0"
xmlns:trl="http://toto.com/translations/1.0">
become
<wml>
If I remove the namespace directly in the XSL file, the Nokia Developpement
toolkit display the following error : "MIME type text/html is not
supported".
Remark : I use Xalan 1.2.
What can I do ?
Thanks in advance,
Anouk