xmlns="" empty string in result

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

xmlns="" empty string in result

antwatkins
Hello,

I downloaded the latest version of 3.0.1 and deployed in tomcat.  However, when I go to my site page http://localhost:8080/carrot2/search I get back the result with no format.  After investigating the source w/ firebug I see that many of my elements display with xmlns="".  When I delete these elements in firebug my display begins to correct itself.  I have looked high and low to try to identify how to get rid of the empty xmlns element, but to no avail.  When I inspect the public carrot search (http://demo.carrot2.org/stable/search), there is no such element.  Here are some examples of where it is placed in my output:

<link xmlns="" rel="stylesheet" href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss" type="text/css">

...

<body id="startup">
   <div xmlns="">

plus many more...

Any ideas on what could be causing this?  I have looked in common/page.xsl (mine and the one at http://demo.carrot2.org/stable/skins37/common/page.xsl ) and I see no differences.  I'm running Tomcat 6.0.18.
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

Dawid Weiss-2

Namespace prefix is most likely added by the XML engine your Java is using. This
is odd though -- we're running in a number of configurations and haven't
experienced this.

Can you tell a bit about the details of your configuration? Operating system,
Java version used?

Dawid

antwatkins wrote:

> Hello,
>
> I downloaded the latest version of 3.0.1 and deployed in tomcat.  However,
> when I go to my site page http://localhost:8080/carrot2/search I get back
> the result with no format.  After investigating the source w/ firebug I see
> that many of my elements display with xmlns="".  When I delete these
> elements in firebug my display begins to correct itself.  I have looked high
> and low to try to identify how to get rid of the empty xmlns element, but to
> no avail.  When I inspect the public carrot search
> (http://demo.carrot2.org/stable/search), there is no such element.  Here are
> some examples of where it is placed in my output:
>
> <link xmlns="" rel="stylesheet"
> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss" type="text/css">
>
> ...
>
> <body id="startup">
>    <div xmlns="">
>
> plus many more...
>
> Any ideas on what could be causing this?  I have looked in common/page.xsl
> (mine and the one at http://demo.carrot2.org/stable/skins37/common/page.xsl
> ) and I see no differences.  I'm running Tomcat 6.0.18.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

antwatkins
Dawid,

Thanks for the quick response.  I figured out how to get around the issue late last night.  From my research online, it is actually the correct behavior to add xmlns="" when adding an external element to an xml result (through an apply-templates call for example) that has a defined namespace.  The engine sets the xmlns="" to denote that the new element has not been specified to share the same namespace as the calling template.  If you use the xsl:element construct, there is a namespace attribute to define the namespace you are using.  In the XSLT 2.0 specification, the xsl:element now has an inherit-namespaces attribtute for this reason as well.  My workaround was to specify the namespace in the root stylesheet element, so that it now looks like

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" <b>xmlns="http://www.w3.org/1999/xhtml" >

Making the default namespace the same as specified in the <html> element resolves the xmlns problem.  I still have an issue though with how it is rendering.  It seems as though my Javascript is not executing.

Now, as soon as I read your response this morning, I knew exactly what my issue was.  I process XSLT for other projects in my tomcat installation and I am using Saxonica 9.  I don't know what engine comes in your package, but it's obviously a different engine or a different version, because when I removed Saxonica from my lib folder, everything worked with no problem.  My problem now is that I need Saxonica deployed for my other work and as I mentioned above, I am having problems with my Javascript being recognized. I get the noscript error when that engine is used and I don't know why, because my browser is set to execute JS and when I use your default engine I have no problems.

Can you tell me what XSLT engine and version you use?

Thanks again for your help and I know my first paragraph didn't relate specifically to what you asked, but I thought it may be helpful to someone else in the future reading these forums.

Regards,

Anthony

Dawid Weiss wrote
Namespace prefix is most likely added by the XML engine your Java is using. This
is odd though -- we're running in a number of configurations and haven't
experienced this.

Can you tell a bit about the details of your configuration? Operating system,
Java version used?

Dawid

antwatkins wrote:
> Hello,
>
> I downloaded the latest version of 3.0.1 and deployed in tomcat.  However,
> when I go to my site page http://localhost:8080/carrot2/search I get back
> the result with no format.  After investigating the source w/ firebug I see
> that many of my elements display with xmlns="".  When I delete these
> elements in firebug my display begins to correct itself.  I have looked high
> and low to try to identify how to get rid of the empty xmlns element, but to
> no avail.  When I inspect the public carrot search
> (http://demo.carrot2.org/stable/search), there is no such element.  Here are
> some examples of where it is placed in my output:
>
> <link xmlns="" rel="stylesheet"
> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss" type="text/css">
>
> ...
>
> <body id="startup">
>    <div xmlns="">
>
> plus many more...
>
> Any ideas on what could be causing this?  I have looked in common/page.xsl
> (mine and the one at http://demo.carrot2.org/stable/skins37/common/page.xsl
> ) and I see no differences.  I'm running Tomcat 6.0.18.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

antwatkins
Dawid,

This post is based on my previous reply.  I discovered why my javascript is not executing.  When I use the Saxonica engine, the document.contentType comes back as application/xml, but when I use your engine it comes back as application/html.  I haven't figured out why that is occurring yet, but I wanted to let you know what the problem was so you wouldn't spend anytime researching that aspect of my previous post.

Thanks,

Anthony

antwatkins wrote
Dawid,

Thanks for the quick response.  I figured out how to get around the issue late last night.  From my research online, it is actually the correct behavior to add xmlns="" when adding an external element to an xml result (through an apply-templates call for example) that has a defined namespace.  The engine sets the xmlns="" to denote that the new element has not been specified to share the same namespace as the calling template.  If you use the xsl:element construct, there is a namespace attribute to define the namespace you are using.  In the XSLT 2.0 specification, the xsl:element now has an inherit-namespaces attribtute for this reason as well.  My workaround was to specify the namespace in the root stylesheet element, so that it now looks like

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" <b>xmlns="http://www.w3.org/1999/xhtml" >

Making the default namespace the same as specified in the <html> element resolves the xmlns problem.  I still have an issue though with how it is rendering.  It seems as though my Javascript is not executing.

Now, as soon as I read your response this morning, I knew exactly what my issue was.  I process XSLT for other projects in my tomcat installation and I am using Saxonica 9.  I don't know what engine comes in your package, but it's obviously a different engine or a different version, because when I removed Saxonica from my lib folder, everything worked with no problem.  My problem now is that I need Saxonica deployed for my other work and as I mentioned above, I am having problems with my Javascript being recognized. I get the noscript error when that engine is used and I don't know why, because my browser is set to execute JS and when I use your default engine I have no problems.

Can you tell me what XSLT engine and version you use?

Thanks again for your help and I know my first paragraph didn't relate specifically to what you asked, but I thought it may be helpful to someone else in the future reading these forums.

Regards,

Anthony

Dawid Weiss wrote
Namespace prefix is most likely added by the XML engine your Java is using. This
is odd though -- we're running in a number of configurations and haven't
experienced this.

Can you tell a bit about the details of your configuration? Operating system,
Java version used?

Dawid

antwatkins wrote:
> Hello,
>
> I downloaded the latest version of 3.0.1 and deployed in tomcat.  However,
> when I go to my site page http://localhost:8080/carrot2/search I get back
> the result with no format.  After investigating the source w/ firebug I see
> that many of my elements display with xmlns="".  When I delete these
> elements in firebug my display begins to correct itself.  I have looked high
> and low to try to identify how to get rid of the empty xmlns element, but to
> no avail.  When I inspect the public carrot search
> (http://demo.carrot2.org/stable/search), there is no such element.  Here are
> some examples of where it is placed in my output:
>
> <link xmlns="" rel="stylesheet"
> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss" type="text/css">
>
> ...
>
> <body id="startup">
>    <div xmlns="">
>
> plus many more...
>
> Any ideas on what could be causing this?  I have looked in common/page.xsl
> (mine and the one at http://demo.carrot2.org/stable/skins37/common/page.xsl
> ) and I see no differences.  I'm running Tomcat 6.0.18.

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

Dawid Weiss-2

Hi Anthony,

Thanks for your insights into the problem. I strongly believe our software
shouldn't be XSLT-processor dependent, so it should work with both Saxonica and
Xalan/Xerces combination (which is the default shipped with the JDK). Which
exact version of Saxon are you using? Is it the open-source one or the
commercial one? I filed an issue for this:

http://issues.carrot2.org/browse/CARROT-507

Dawid

antwatkins wrote:

> Dawid,
>
> This post is based on my previous reply.  I discovered why my javascript is
> not executing.  When I use the Saxonica engine, the document.contentType
> comes back as application/xml, but when I use your engine it comes back as
> application/html.  I haven't figured out why that is occurring yet, but I
> wanted to let you know what the problem was so you wouldn't spend anytime
> researching that aspect of my previous post.
>
> Thanks,
>
> Anthony
>
>
> antwatkins wrote:
>> Dawid,
>>
>> Thanks for the quick response.  I figured out how to get around the issue
>> late last night.  From my research online, it is actually the correct
>> behavior to add xmlns="" when adding an external element to an xml result
>> (through an apply-templates call for example) that has a defined
>> namespace.  The engine sets the xmlns="" to denote that the new element
>> has not been specified to share the same namespace as the calling
>> template.  If you use the xsl:element construct, there is a namespace
>> attribute to define the namespace you are using.  In the XSLT 2.0
>> specification, the xsl:element now has an inherit-namespaces attribtute
>> for this reason as well.  My workaround was to specify the namespace in
>> the root stylesheet element, so that it now looks like
>>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> version="1.0" xmlns="http://www.w3.org/1999/xhtml" >
>>
>> Making the default namespace the same as specified in the <html> element
>> resolves the xmlns problem.  I still have an issue though with how it is
>> rendering.  It seems as though my Javascript is not executing.
>>
>> Now, as soon as I read your response this morning, I knew exactly what my
>> issue was.  I process XSLT for other projects in my tomcat installation
>> and I am using Saxonica 9.  I don't know what engine comes in your
>> package, but it's obviously a different engine or a different version,
>> because when I removed Saxonica from my lib folder, everything worked with
>> no problem.  My problem now is that I need Saxonica deployed for my other
>> work and as I mentioned above, I am having problems with my Javascript
>> being recognized. I get the noscript error when that engine is used and I
>> don't know why, because my browser is set to execute JS and when I use
>> your default engine I have no problems.
>>
>> Can you tell me what XSLT engine and version you use?
>>
>> Thanks again for your help and I know my first paragraph didn't relate
>> specifically to what you asked, but I thought it may be helpful to someone
>> else in the future reading these forums.
>>
>> Regards,
>>
>> Anthony
>>
>>
>> Dawid Weiss wrote:
>>>
>>> Namespace prefix is most likely added by the XML engine your Java is
>>> using. This
>>> is odd though -- we're running in a number of configurations and haven't
>>> experienced this.
>>>
>>> Can you tell a bit about the details of your configuration? Operating
>>> system,
>>> Java version used?
>>>
>>> Dawid
>>>
>>> antwatkins wrote:
>>>> Hello,
>>>>
>>>> I downloaded the latest version of 3.0.1 and deployed in tomcat.
>>>> However,
>>>> when I go to my site page http://localhost:8080/carrot2/search I get
>>>> back
>>>> the result with no format.  After investigating the source w/ firebug I
>>>> see
>>>> that many of my elements display with xmlns="".  When I delete these
>>>> elements in firebug my display begins to correct itself.  I have looked
>>>> high
>>>> and low to try to identify how to get rid of the empty xmlns element,
>>>> but to
>>>> no avail.  When I inspect the public carrot search
>>>> (http://demo.carrot2.org/stable/search), there is no such element.  Here
>>>> are
>>>> some examples of where it is placed in my output:
>>>>
>>>> <link xmlns="" rel="stylesheet"
>>>> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss"
>>>> type="text/css">
>>>>
>>>> ...
>>>>
>>>> <body id="startup">
>>>>    <div xmlns="">
>>>>
>>>> plus many more...
>>>>
>>>> Any ideas on what could be causing this?  I have looked in
>>>> common/page.xsl
>>>> (mine and the one at
>>>> http://demo.carrot2.org/stable/skins37/common/page.xsl
>>>> ) and I see no differences.  I'm running Tomcat 6.0.18.
>>> ------------------------------------------------------------------------------
>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>>> production scanning environment may not be a perfect world - but thanks
>>> to
>>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>>> i700
>>> Series Scanner you'll get full speed at 300 dpi even with all image
>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> _______________________________________________
>>> Carrot2-developers mailing list
>>> [hidden email]
>>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>>
>>>
>>
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

antwatkins
Dawid,

I'm actually headed out of town to NY for the weekend, but I wanted to try to answer your question before I left.  I am using the open-source version 9.  I am not sure of the minor/build number though.  I downloaded it probably a couple of months ago and the date on the files are from the 15th of  December 2008.  Once I have a chance to locate my install files (if I still have them), I will try to provide you a more detailed answer.  The two libs I have installed in the tomcat/lib directory are saxon9.jar and saxon9-dom.jar.

Thanks for your attention in this matter.

Regards,

Anthony


JIRA dawid.weiss@cs.put.poznan.pl wrote
Hi Anthony,

Thanks for your insights into the problem. I strongly believe our software
shouldn't be XSLT-processor dependent, so it should work with both Saxonica and
Xalan/Xerces combination (which is the default shipped with the JDK). Which
exact version of Saxon are you using? Is it the open-source one or the
commercial one? I filed an issue for this:

http://issues.carrot2.org/browse/CARROT-507

Dawid

antwatkins wrote:
> Dawid,
>
> This post is based on my previous reply.  I discovered why my javascript is
> not executing.  When I use the Saxonica engine, the document.contentType
> comes back as application/xml, but when I use your engine it comes back as
> application/html.  I haven't figured out why that is occurring yet, but I
> wanted to let you know what the problem was so you wouldn't spend anytime
> researching that aspect of my previous post.
>
> Thanks,
>
> Anthony
>
>
> antwatkins wrote:
>> Dawid,
>>
>> Thanks for the quick response.  I figured out how to get around the issue
>> late last night.  From my research online, it is actually the correct
>> behavior to add xmlns="" when adding an external element to an xml result
>> (through an apply-templates call for example) that has a defined
>> namespace.  The engine sets the xmlns="" to denote that the new element
>> has not been specified to share the same namespace as the calling
>> template.  If you use the xsl:element construct, there is a namespace
>> attribute to define the namespace you are using.  In the XSLT 2.0
>> specification, the xsl:element now has an inherit-namespaces attribtute
>> for this reason as well.  My workaround was to specify the namespace in
>> the root stylesheet element, so that it now looks like
>>
>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> version="1.0" xmlns="http://www.w3.org/1999/xhtml" >
>>
>> Making the default namespace the same as specified in the <html> element
>> resolves the xmlns problem.  I still have an issue though with how it is
>> rendering.  It seems as though my Javascript is not executing.
>>
>> Now, as soon as I read your response this morning, I knew exactly what my
>> issue was.  I process XSLT for other projects in my tomcat installation
>> and I am using Saxonica 9.  I don't know what engine comes in your
>> package, but it's obviously a different engine or a different version,
>> because when I removed Saxonica from my lib folder, everything worked with
>> no problem.  My problem now is that I need Saxonica deployed for my other
>> work and as I mentioned above, I am having problems with my Javascript
>> being recognized. I get the noscript error when that engine is used and I
>> don't know why, because my browser is set to execute JS and when I use
>> your default engine I have no problems.
>>
>> Can you tell me what XSLT engine and version you use?
>>
>> Thanks again for your help and I know my first paragraph didn't relate
>> specifically to what you asked, but I thought it may be helpful to someone
>> else in the future reading these forums.
>>
>> Regards,
>>
>> Anthony
>>
>>
>> Dawid Weiss wrote:
>>>
>>> Namespace prefix is most likely added by the XML engine your Java is
>>> using. This
>>> is odd though -- we're running in a number of configurations and haven't
>>> experienced this.
>>>
>>> Can you tell a bit about the details of your configuration? Operating
>>> system,
>>> Java version used?
>>>
>>> Dawid
>>>
>>> antwatkins wrote:
>>>> Hello,
>>>>
>>>> I downloaded the latest version of 3.0.1 and deployed in tomcat.
>>>> However,
>>>> when I go to my site page http://localhost:8080/carrot2/search I get
>>>> back
>>>> the result with no format.  After investigating the source w/ firebug I
>>>> see
>>>> that many of my elements display with xmlns="".  When I delete these
>>>> elements in firebug my display begins to correct itself.  I have looked
>>>> high
>>>> and low to try to identify how to get rid of the empty xmlns element,
>>>> but to
>>>> no avail.  When I inspect the public carrot search
>>>> (http://demo.carrot2.org/stable/search), there is no such element.  Here
>>>> are
>>>> some examples of where it is placed in my output:
>>>>
>>>> <link xmlns="" rel="stylesheet"
>>>> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss"
>>>> type="text/css">
>>>>
>>>> ...
>>>>
>>>> <body id="startup">
>>>>    <div xmlns="">
>>>>
>>>> plus many more...
>>>>
>>>> Any ideas on what could be causing this?  I have looked in
>>>> common/page.xsl
>>>> (mine and the one at
>>>> http://demo.carrot2.org/stable/skins37/common/page.xsl
>>>> ) and I see no differences.  I'm running Tomcat 6.0.18.
>>> ------------------------------------------------------------------------------
>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>>> production scanning environment may not be a perfect world - but thanks
>>> to
>>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>>> i700
>>> Series Scanner you'll get full speed at 300 dpi even with all image
>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>> _______________________________________________
>>> Carrot2-developers mailing list
>>> Carrot2-developers@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>>
>>>
>>
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
Carrot2-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

Dawid Weiss-2

Can you simply send them to my private e-mail: [hidden email]?
Thanks. Enjoy the weekend, btw.

Dawid

antwatkins wrote:

> Dawid,
>
> I'm actually headed out of town to NY for the weekend, but I wanted to try
> to answer your question before I left.  I am using the open-source version
> 9.  I am not sure of the minor/build number though.  I downloaded it
> probably a couple of months ago and the date on the files are from the 15th
> of  December 2008.  Once I have a chance to locate my install files (if I
> still have them), I will try to provide you a more detailed answer.  The two
> libs I have installed in the tomcat/lib directory are saxon9.jar and
> saxon9-dom.jar.
>
> Thanks for your attention in this matter.
>
> Regards,
>
> Anthony
>
>
>
> JIRA [hidden email] wrote:
>>
>> Hi Anthony,
>>
>> Thanks for your insights into the problem. I strongly believe our software
>> shouldn't be XSLT-processor dependent, so it should work with both
>> Saxonica and
>> Xalan/Xerces combination (which is the default shipped with the JDK).
>> Which
>> exact version of Saxon are you using? Is it the open-source one or the
>> commercial one? I filed an issue for this:
>>
>> http://issues.carrot2.org/browse/CARROT-507
>>
>> Dawid
>>
>> antwatkins wrote:
>>> Dawid,
>>>
>>> This post is based on my previous reply.  I discovered why my javascript
>>> is
>>> not executing.  When I use the Saxonica engine, the document.contentType
>>> comes back as application/xml, but when I use your engine it comes back
>>> as
>>> application/html.  I haven't figured out why that is occurring yet, but I
>>> wanted to let you know what the problem was so you wouldn't spend anytime
>>> researching that aspect of my previous post.
>>>
>>> Thanks,
>>>
>>> Anthony
>>>
>>>
>>> antwatkins wrote:
>>>> Dawid,
>>>>
>>>> Thanks for the quick response.  I figured out how to get around the
>>>> issue
>>>> late last night.  From my research online, it is actually the correct
>>>> behavior to add xmlns="" when adding an external element to an xml
>>>> result
>>>> (through an apply-templates call for example) that has a defined
>>>> namespace.  The engine sets the xmlns="" to denote that the new element
>>>> has not been specified to share the same namespace as the calling
>>>> template.  If you use the xsl:element construct, there is a namespace
>>>> attribute to define the namespace you are using.  In the XSLT 2.0
>>>> specification, the xsl:element now has an inherit-namespaces attribtute
>>>> for this reason as well.  My workaround was to specify the namespace in
>>>> the root stylesheet element, so that it now looks like
>>>>
>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>> version="1.0" xmlns="http://www.w3.org/1999/xhtml" >
>>>>
>>>> Making the default namespace the same as specified in the <html> element
>>>> resolves the xmlns problem.  I still have an issue though with how it is
>>>> rendering.  It seems as though my Javascript is not executing.
>>>>
>>>> Now, as soon as I read your response this morning, I knew exactly what
>>>> my
>>>> issue was.  I process XSLT for other projects in my tomcat installation
>>>> and I am using Saxonica 9.  I don't know what engine comes in your
>>>> package, but it's obviously a different engine or a different version,
>>>> because when I removed Saxonica from my lib folder, everything worked
>>>> with
>>>> no problem.  My problem now is that I need Saxonica deployed for my
>>>> other
>>>> work and as I mentioned above, I am having problems with my Javascript
>>>> being recognized. I get the noscript error when that engine is used and
>>>> I
>>>> don't know why, because my browser is set to execute JS and when I use
>>>> your default engine I have no problems.
>>>>
>>>> Can you tell me what XSLT engine and version you use?
>>>>
>>>> Thanks again for your help and I know my first paragraph didn't relate
>>>> specifically to what you asked, but I thought it may be helpful to
>>>> someone
>>>> else in the future reading these forums.
>>>>
>>>> Regards,
>>>>
>>>> Anthony
>>>>
>>>>
>>>> Dawid Weiss wrote:
>>>>> Namespace prefix is most likely added by the XML engine your Java is
>>>>> using. This
>>>>> is odd though -- we're running in a number of configurations and
>>>>> haven't
>>>>> experienced this.
>>>>>
>>>>> Can you tell a bit about the details of your configuration? Operating
>>>>> system,
>>>>> Java version used?
>>>>>
>>>>> Dawid
>>>>>
>>>>> antwatkins wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I downloaded the latest version of 3.0.1 and deployed in tomcat.
>>>>>> However,
>>>>>> when I go to my site page http://localhost:8080/carrot2/search I get
>>>>>> back
>>>>>> the result with no format.  After investigating the source w/ firebug
>>>>>> I
>>>>>> see
>>>>>> that many of my elements display with xmlns="".  When I delete these
>>>>>> elements in firebug my display begins to correct itself.  I have
>>>>>> looked
>>>>>> high
>>>>>> and low to try to identify how to get rid of the empty xmlns element,
>>>>>> but to
>>>>>> no avail.  When I inspect the public carrot search
>>>>>> (http://demo.carrot2.org/stable/search), there is no such element.
>>>>>> Here
>>>>>> are
>>>>>> some examples of where it is placed in my output:
>>>>>>
>>>>>> <link xmlns="" rel="stylesheet"
>>>>>> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss"
>>>>>> type="text/css">
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> <body id="startup">
>>>>>>    <div xmlns="">
>>>>>>
>>>>>> plus many more...
>>>>>>
>>>>>> Any ideas on what could be causing this?  I have looked in
>>>>>> common/page.xsl
>>>>>> (mine and the one at
>>>>>> http://demo.carrot2.org/stable/skins37/common/page.xsl
>>>>>> ) and I see no differences.  I'm running Tomcat 6.0.18.
>>>>> ------------------------------------------------------------------------------
>>>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>>>>> Your
>>>>> production scanning environment may not be a perfect world - but thanks
>>>>> to
>>>>> Kodak, there's a perfect scanner to get the job done! With the NEW
>>>>> KODAK
>>>>> i700
>>>>> Series Scanner you'll get full speed at 300 dpi even with all image
>>>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>>>> _______________________________________________
>>>>> Carrot2-developers mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>>>>
>>>>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Carrot2-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>
>>
>

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers
Reply | Threaded
Open this post in threaded view
|

Re: xmlns="" empty string in result

Dawid Weiss-2
In reply to this post by antwatkins

Anthony,

Check out the trunk -- there was a bug in the XSLT filtering code (or actually a
quirk of the standard library that required a workaround). Everything seems to
work for me now.

Dawid

antwatkins wrote:

> Dawid,
>
> I'm actually headed out of town to NY for the weekend, but I wanted to try
> to answer your question before I left.  I am using the open-source version
> 9.  I am not sure of the minor/build number though.  I downloaded it
> probably a couple of months ago and the date on the files are from the 15th
> of  December 2008.  Once I have a chance to locate my install files (if I
> still have them), I will try to provide you a more detailed answer.  The two
> libs I have installed in the tomcat/lib directory are saxon9.jar and
> saxon9-dom.jar.
>
> Thanks for your attention in this matter.
>
> Regards,
>
> Anthony
>
>
>
> JIRA [hidden email] wrote:
>>
>> Hi Anthony,
>>
>> Thanks for your insights into the problem. I strongly believe our software
>> shouldn't be XSLT-processor dependent, so it should work with both
>> Saxonica and
>> Xalan/Xerces combination (which is the default shipped with the JDK).
>> Which
>> exact version of Saxon are you using? Is it the open-source one or the
>> commercial one? I filed an issue for this:
>>
>> http://issues.carrot2.org/browse/CARROT-507
>>
>> Dawid
>>
>> antwatkins wrote:
>>> Dawid,
>>>
>>> This post is based on my previous reply.  I discovered why my javascript
>>> is
>>> not executing.  When I use the Saxonica engine, the document.contentType
>>> comes back as application/xml, but when I use your engine it comes back
>>> as
>>> application/html.  I haven't figured out why that is occurring yet, but I
>>> wanted to let you know what the problem was so you wouldn't spend anytime
>>> researching that aspect of my previous post.
>>>
>>> Thanks,
>>>
>>> Anthony
>>>
>>>
>>> antwatkins wrote:
>>>> Dawid,
>>>>
>>>> Thanks for the quick response.  I figured out how to get around the
>>>> issue
>>>> late last night.  From my research online, it is actually the correct
>>>> behavior to add xmlns="" when adding an external element to an xml
>>>> result
>>>> (through an apply-templates call for example) that has a defined
>>>> namespace.  The engine sets the xmlns="" to denote that the new element
>>>> has not been specified to share the same namespace as the calling
>>>> template.  If you use the xsl:element construct, there is a namespace
>>>> attribute to define the namespace you are using.  In the XSLT 2.0
>>>> specification, the xsl:element now has an inherit-namespaces attribtute
>>>> for this reason as well.  My workaround was to specify the namespace in
>>>> the root stylesheet element, so that it now looks like
>>>>
>>>> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>>>> version="1.0" xmlns="http://www.w3.org/1999/xhtml" >
>>>>
>>>> Making the default namespace the same as specified in the <html> element
>>>> resolves the xmlns problem.  I still have an issue though with how it is
>>>> rendering.  It seems as though my Javascript is not executing.
>>>>
>>>> Now, as soon as I read your response this morning, I knew exactly what
>>>> my
>>>> issue was.  I process XSLT for other projects in my tomcat installation
>>>> and I am using Saxonica 9.  I don't know what engine comes in your
>>>> package, but it's obviously a different engine or a different version,
>>>> because when I removed Saxonica from my lib folder, everything worked
>>>> with
>>>> no problem.  My problem now is that I need Saxonica deployed for my
>>>> other
>>>> work and as I mentioned above, I am having problems with my Javascript
>>>> being recognized. I get the noscript error when that engine is used and
>>>> I
>>>> don't know why, because my browser is set to execute JS and when I use
>>>> your default engine I have no problems.
>>>>
>>>> Can you tell me what XSLT engine and version you use?
>>>>
>>>> Thanks again for your help and I know my first paragraph didn't relate
>>>> specifically to what you asked, but I thought it may be helpful to
>>>> someone
>>>> else in the future reading these forums.
>>>>
>>>> Regards,
>>>>
>>>> Anthony
>>>>
>>>>
>>>> Dawid Weiss wrote:
>>>>> Namespace prefix is most likely added by the XML engine your Java is
>>>>> using. This
>>>>> is odd though -- we're running in a number of configurations and
>>>>> haven't
>>>>> experienced this.
>>>>>
>>>>> Can you tell a bit about the details of your configuration? Operating
>>>>> system,
>>>>> Java version used?
>>>>>
>>>>> Dawid
>>>>>
>>>>> antwatkins wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I downloaded the latest version of 3.0.1 and deployed in tomcat.
>>>>>> However,
>>>>>> when I go to my site page http://localhost:8080/carrot2/search I get
>>>>>> back
>>>>>> the result with no format.  After investigating the source w/ firebug
>>>>>> I
>>>>>> see
>>>>>> that many of my elements display with xmlns="".  When I delete these
>>>>>> elements in firebug my display begins to correct itself.  I have
>>>>>> looked
>>>>>> high
>>>>>> and low to try to identify how to get rid of the empty xmlns element,
>>>>>> but to
>>>>>> no avail.  When I inspect the public carrot search
>>>>>> (http://demo.carrot2.org/stable/search), there is no such element.
>>>>>> Here
>>>>>> are
>>>>>> some examples of where it is placed in my output:
>>>>>>
>>>>>> <link xmlns="" rel="stylesheet"
>>>>>> href="/carrot2/gzip_895476137/fancy-compact-sprite.jcss"
>>>>>> type="text/css">
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> <body id="startup">
>>>>>>    <div xmlns="">
>>>>>>
>>>>>> plus many more...
>>>>>>
>>>>>> Any ideas on what could be causing this?  I have looked in
>>>>>> common/page.xsl
>>>>>> (mine and the one at
>>>>>> http://demo.carrot2.org/stable/skins37/common/page.xsl
>>>>>> ) and I see no differences.  I'm running Tomcat 6.0.18.
>>>>> ------------------------------------------------------------------------------
>>>>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances!
>>>>> Your
>>>>> production scanning environment may not be a perfect world - but thanks
>>>>> to
>>>>> Kodak, there's a perfect scanner to get the job done! With the NEW
>>>>> KODAK
>>>>> i700
>>>>> Series Scanner you'll get full speed at 300 dpi even with all image
>>>>> processing features enabled. http://p.sf.net/sfu/kodak-com
>>>>> _______________________________________________
>>>>> Carrot2-developers mailing list
>>>>> [hidden email]
>>>>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>>>>
>>>>>
>> ------------------------------------------------------------------------------
>> The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
>> production scanning environment may not be a perfect world - but thanks to
>> Kodak, there's a perfect scanner to get the job done! With the NEW KODAK
>> i700
>> Series Scanner you'll get full speed at 300 dpi even with all image
>> processing features enabled. http://p.sf.net/sfu/kodak-com
>> _______________________________________________
>> Carrot2-developers mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>>
>>
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers