You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Dmitry Hayes <dm...@ca.ibm.com> on 2007/02/14 20:15:35 UTC

Re: Xalan, 1.10, Solaris

Hi Devanathan
xalan-c-users@xml.apache.org mailing list would be the best place to ask 
such a question . 
XalanC builds with Solaris (2.8 , Forte6.2) and you can find binaries on 
the website. Not sure what you mean with words "no namespaces", because 
XalanC uses C++ namespaces intensively. 
If you need to pass addition options to the compiler/linker , you can do 
it through $XALANCROOT/runConfigure utility or you may tweak the makefiles 
(look at $XALANCROOT/Makefile.incl, Solaris section) .

Thanks!
Dmitry 




"Devanathan, Ramkumar (HP OpenView)" <ra...@hp.com> 
14/02/2007 01:57 PM

To
Dmitry Hayes/Toronto/IBM@IBMCA
cc

Subject
Xalan, 1.10, Solaris






hi Dmitry, i am from hewlett packard's openview r&d center @ Bangalore, 
India.
 
Here we are building and using Xalan 1.10 and Xerces 2.7 (c++ apis) for 
one of the products developed here.
 
I noticed your name and email id mentioned at Xalan-dev mailing group and 
I am wondering if -
1. you will be able to help me out with quite a few issues that we are 
facing with building and using the above libs
- or -
2. you know any active HP engineer in the Xalan-dev group with whom i can 
get help on this front.
 
sorry if this is abrupt. I have tried emailing the xalan user mailing 
lists earlier and did not solutions for my problems.
 
one of these (the latest) is how to build xalan and xerces (above 
versions) on solaris with the Sun Workshop (forte) 6 update 2 compiler 
without the namespace - i need to know which are the correct options to 
use + correct compiler and linker options - looks like the libraries that 
your team provides at the download page are built using the same compiler 
version, except that these are built with the namespace.
 
i tried for a while following standard procedure, without much success 
(got some more errors everytime i resolved some) and then finally gave up 
and built xerces and xalan with gcc - this worked. However my product 
itself must be built with forte compiler and i am not sure if i can mix 
and match gcc-built libraries with my forte-built application binary.
 
Would you be able to help me with this? also, i have a few more questions.
 
Let me know if and when i can call you if that will save some time for you 
:)
 
Thank you and looking forward to your expert advice.
________________________________________________________________________________
Ramkumar Devanathan
HP Software R&D
Bangalore
India
PHONE: (91)-080-2205-2219
Ecard: http://www.ecardfile.com/id/ramkumardevanathan
________________________________________________________________________________
Find out what is happening in the ITRC and BSD Forums at 
http://forums.itrc.hp.com and http://bizforums.itrc.hp.com 
 

Re: Xalan, 1.10, Solaris

Posted by David Bertoni <db...@apache.org>.
Dmitry Hayes wrote:
> 
> Hi Devanathan
> xalan-c-users@xml.apache.org mailing list would be the best place to ask 
> such a question .
> XalanC builds with Solaris (2.8 , Forte6.2) and you can find binaries on 
> the website. Not sure what you mean with words "no namespaces", because 
> XalanC uses C++ namespaces intensively.

Xalan-C used to build fine without namespace support, since we supported 
older compilers that didn't implement C++ namespaces.  But it's been a long 
time since we've tested that way.

...

> 
> hi Dmitry, i am from hewlett packard's openview r&d center @ Bangalore, 
> India.
>  
> Here we are building and using Xalan 1.10 and Xerces 2.7 (c++ apis) for 
> one of the products developed here.
>  
> I noticed your name and email id mentioned at Xalan-dev mailing group 
> and I am wondering if -
> 1. you will be able to help me out with quite a few issues that we are 
> facing with building and using the above libs
> - or -
> 2. you know any active HP engineer in the Xalan-dev group with whom i 
> can get help on this front.

Posting to the mailing list is how you get support, but nothing is 
guaranteed.  You are more likely to get responses if you post your 
questions in a polite, concise manner.

I'm not sure what you mean by "active HP engineer," so I can't answer that 
question.  If by that, you mean an employee of HP, then the answer is no.

>  
> sorry if this is abrupt. I have tried emailing the xalan user mailing 
> lists earlier and did not solutions for my problems.

I can't find any of your postings in the archives of the mailing group, so 
perhaps they never made it there.

>  
> one of these (the latest) is how to build xalan and xerces (above 
> versions) on solaris with the Sun Workshop (forte) 6 update 2 compiler 
> without the namespace - i need to know which are the correct options to 
> use + correct compiler and linker options - looks like the libraries 
> that your team provides at the download page are built using the same 
> compiler version, except that these are built with the namespace.

You can simply modify the file src/xalanc/Include/SolarisDefinitions.hpp 
and comment out the following line:

//#define XALAN_HAS_CPP_NAMESPACE

>  
> i tried for a while following standard procedure, without much success 
> (got some more errors everytime i resolved some) and then finally gave 
> up and built xerces and xalan with gcc - this worked. However my product 
> itself must be built with forte compiler and i am not sure if i can mix 
> and match gcc-built libraries with my forte-built application binary.

You cannot mix GCC and Sun compiler binaries.

Dave

Re: Xalan, 1.10, Solaris

Posted by David Bertoni <db...@apache.org>.
Devanathan, Ramkumar (HP OpenView) wrote:
> Hi all,
>  

First of all, please make sure you subscribe to the list before posting. 
Information about doing that is found here:

http://xml.apache.org/mail.html#xalan-c-users

I approved this first post, but future ones will be rejected.


> Repeating the problem with more details here:
>  
> I am building Xerces 2.7 and Xalan 1.10 on solaris (c++). There are 
> the defines XERCES_HAS_CPP_NAMESPACE and XALAN_HAS_CPP_NAMESPACE in the 
> xerces and xalan header files, and i am undef-ing these so that all the 
> xalan and xerces functions are in the global namespace rather than in 
> xercesc_2_7 and xalanc_1_10 namespaces. i need it this way for some 
> particular reasons entirely internal to the project we are working on.

It's been a long time since anyone has built Xalan-C or Xerces-C without 
namespaces, so you may run into problems.

>  
> If the above is possible, I need to know what are the standard options 
> (to runConfigure script) that are set for running xalan and xerces 
> builds with Forte c++ 6 update 2 compiler on solaris 2.7.

No, there is no runConfigure option to do that, since the choice is to 
always use namespaces if the compiler supports them.

Dave

Re: XML Namespace Prefix Question

Posted by David Bertoni <db...@apache.org>.
Vaithianathan, Shankar (c) wrote:
> okay..sorry for posting it here..
> I suppose jdk uses xalan...if not apologize for posting it here..
> Thanks for ur reply thou'

Yes, the JDK ships with Xalan-J, but it does not ship with Xalan-C.  This 
is the Xalan-C users list.

If you have product-specific questions about Xalan-J, post them to the 
Xalan-J user list.  If you have general questions about XPath, XSLT, etc., 
you should probably try the Mulberry Technology XSL list first.

Dave

RE: XML Namespace Prefix Question

Posted by "Vaithianathan, Shankar (c)" <Sh...@gateway.com>.
okay..sorry for posting it here..
I suppose jdk uses xalan...if not apologize for posting it here..
Thanks for ur reply thou'

-----Original Message-----
From: David Bertoni [mailto:dbertoni@apache.org] 
Sent: Wednesday, February 14, 2007 1:40 PM
To: xalan-c-users@xml.apache.org
Subject: Re: XML Namespace Prefix Question

Vaithianathan, Shankar (c) wrote:
> Guys,
> 
> I have a very basic Question on namespace prefixes when using an xpath

> expression.
> 

the Xalan-C users list is not the appropriate forum for general XML
questions.

> I have a document,
> 
> <foo:A xmlns:foo="urn:foo.org">
>             <B>123</B>
>             <C>456</C>
>             <D>789</D>
> </foo:A>
> 
> 
> If an xpath = "foo:A/foo:C" is applied it doesn't return anything and 
> obviously it works for "//*/C". Does every element under A should come

> with a namespace prefix "foo:"

If the context node is the document node, and the prefix foo is mapped
to 
the URI "urn:foo.org", then the XPath expression "foo:A/foo:C" will not 
return any nodes, because the element "C" is not in the namespace 
"urn:foo.org".

In the following document, C is in the same namespace as A:

<foo:A xmlns:foo="urn:foo.org">
     <B>123</B>
     <foo:C>456</foo:C>
     <D>789</D>
</foo:A>

> 
> If the xml is structured as
> 
> <A xmlns="urn:foo.org">
>             <B xmlns:foo="urn:foo.org">123</B>
>             <C xmlns:foo="urn:foo.org">456</C>
>             <D xmlns:foo="urn:foo.org">789</D>
> </foo:A>

The namespace declaration on A defines the default namespace, so all 
descendant elements of A without a prefix will be in that namespace.
Note 
that the namespace bindings for the foo prefix on the B, C, and D
elements 
are irrelevant.

> 
> The xpath = "//*/myfoo:C"  [myfoo is the prefix I wish to use while 
> doing the xpath which is passed on through a namespace prefix
resolver]
> 

That XPath expression _will_ return the element C.

> Both are well-formed xml though.
> 

but they are different documents with respect to the expanded names of
the 
elements.

> I am using JDK1.5 XPath API and a custom JAXP1.3 NameSpaceContext 
> implementation.

So why are you asking this question on the C users list?  In fact, you 
should be asking such questions on a general XSLT list, like the
Mulberry 
Technologies XSL list.

> 
> Tools like xmlspy give varied results which I guess they are trying to

> be liberal.

They either have bugs, or are non-conformant.  Or they are conformant,
and 
you're not giving us the correct information.

> 
> Could some one explain what is wrong in the way the prefixes are
declared?

There is nothing wrong with the way the prefixes are declared.  I
suggest 
you read a tutorial on XML Namespaces, so you understand what's going
on.

Dave

Re: XML Namespace Prefix Question

Posted by David Bertoni <db...@apache.org>.
Vaithianathan, Shankar (c) wrote:
> Guys,
> 
> I have a very basic Question on namespace prefixes when using an xpath 
> expression.
> 

the Xalan-C users list is not the appropriate forum for general XML questions.

> I have a document,
> 
> <foo:A xmlns:foo=”urn:foo.org”>
>             <B>123</B>
>             <C>456</C>
>             <D>789</D>
> </foo:A>
> 
> 
> If an xpath = “foo:A/foo:C” is applied it doesn’t return anything and 
> obviously it works for “//*/C”. Does every element under A should come 
> with a namespace prefix “foo:”

If the context node is the document node, and the prefix foo is mapped to 
the URI "urn:foo.org”, then the XPath expression "foo:A/foo:C" will not 
return any nodes, because the element "C" is not in the namespace 
"urn:foo.org”.

In the following document, C is in the same namespace as A:

<foo:A xmlns:foo=”urn:foo.org”>
     <B>123</B>
     <foo:C>456</foo:C>
     <D>789</D>
</foo:A>

> 
> If the xml is structured as
> 
> <A xmlns=”urn:foo.org”>
>             <B xmlns:foo=”urn:foo.org”>123</B>
>             <C xmlns:foo=”urn:foo.org”>456</C>
>             <D xmlns:foo=”urn:foo.org”>789</D>
> </foo:A>

The namespace declaration on A defines the default namespace, so all 
descendant elements of A without a prefix will be in that namespace.  Note 
that the namespace bindings for the foo prefix on the B, C, and D elements 
are irrelevant.

> 
> The xpath = “//*/myfoo:C”  [myfoo is the prefix I wish to use while 
> doing the xpath which is passed on through a namespace prefix resolver]
> 

That XPath expression _will_ return the element C.

> Both are well-formed xml though.
> 

but they are different documents with respect to the expanded names of the 
elements.

> I am using JDK1.5 XPath API and a custom JAXP1.3 NameSpaceContext 
> implementation.

So why are you asking this question on the C users list?  In fact, you 
should be asking such questions on a general XSLT list, like the Mulberry 
Technologies XSL list.

> 
> Tools like xmlspy give varied results which I guess they are trying to 
> be liberal.

They either have bugs, or are non-conformant.  Or they are conformant, and 
you're not giving us the correct information.

> 
> Could some one explain what is wrong in the way the prefixes are declared?

There is nothing wrong with the way the prefixes are declared.  I suggest 
you read a tutorial on XML Namespaces, so you understand what's going on.

Dave

XML Namespace Prefix Question

Posted by "Vaithianathan, Shankar (c)" <Sh...@gateway.com>.
Guys,

I have a very basic Question on namespace prefixes when using an xpath
expression.

 

I have a document,

 

<foo:A xmlns:foo="urn:foo.org">

            <B>123</B>

            <C>456</C>

            <D>789</D>

</foo:A>

 

If an xpath = "foo:A/foo:C" is applied it doesn't return anything and
obviously it works for "//*/C". Does every element under A should come
with a namespace prefix "foo:" 

 

If the xml is structured as 

<A xmlns="urn:foo.org">

            <B xmlns:foo="urn:foo.org">123</B>

            <C xmlns:foo="urn:foo.org">456</C>

            <D xmlns:foo="urn:foo.org">789</D>

</foo:A>

 

The xpath = "//*/myfoo:C"  [myfoo is the prefix I wish to use while
doing the xpath which is passed on through a namespace prefix resolver]

 

Both are well-formed xml though. 

 

I am using JDK1.5 XPath API and a custom JAXP1.3 NameSpaceContext
implementation.

 

Tools like xmlspy give varied results which I guess they are trying to
be liberal.

 

Could some one explain what is wrong in the way the prefixes are
declared?

 

Thanks

Shankar

 


RE: Xalan, 1.10, Solaris

Posted by "Devanathan, Ramkumar (HP OpenView)" <ra...@hp.com>.
Hi all,
 
Repeating the problem with more details here:
 
I am building Xerces 2.7 and Xalan 1.10 on solaris (c++). There are the
defines XERCES_HAS_CPP_NAMESPACE and XALAN_HAS_CPP_NAMESPACE in the
xerces and xalan header files, and i am undef-ing these so that all the
xalan and xerces functions are in the global namespace rather than in
xercesc_2_7 and xalanc_1_10 namespaces. i need it this way for some
particular reasons entirely internal to the project we are working on.
 
If the above is possible, I need to know what are the standard options
(to runConfigure script) that are set for running xalan and xerces
builds with Forte c++ 6 update 2 compiler on solaris 2.7.
 
Thank you.
 

Ramkumar Devanathan <bl...@hp.com> 
HP Software R&D

Bangalore

India

PHONE: (91)-080-2205-2219

Ecard: http://www.ecardfile.com/id/ramkumardevanathan
<blocked::blocked::http://www.ecardfile.com/id/ramkumardevanathan> 

 

________________________________

From: Dmitry Hayes [mailto:dmitryh@ca.ibm.com] 
Sent: Thursday, February 15, 2007 12:46 AM
To: Devanathan, Ramkumar (HP OpenView)
Cc: xalan-c-users@xml.apache.org
Subject: Re: Xalan, 1.10, Solaris



Hi Devanathan 
xalan-c-users@xml.apache.org mailing list would be the best place to ask
such a question . 
XalanC builds with Solaris (2.8 , Forte6.2) and you can find binaries on
the website. Not sure what you mean with words "no namespaces", because
XalanC uses C++ namespaces intensively. 
If you need to pass addition options to the compiler/linker , you can do
it through $XALANCROOT/runConfigure utility or you may tweak the
makefiles (look at $XALANCROOT/Makefile.incl, Solaris section) . 

Thanks! 
Dmitry 




"Devanathan, Ramkumar (HP OpenView)" <ra...@hp.com> 

14/02/2007 01:57 PM 

To
Dmitry Hayes/Toronto/IBM@IBMCA 
cc
Subject
Xalan, 1.10, Solaris

	




hi Dmitry, i am from hewlett packard's openview r&d center @ Bangalore,
India. 
  
Here we are building and using Xalan 1.10 and Xerces 2.7 (c++ apis) for
one of the products developed here. 
  
I noticed your name and email id mentioned at Xalan-dev mailing group
and I am wondering if - 
1. you will be able to help me out with quite a few issues that we are
facing with building and using the above libs 
- or - 
2. you know any active HP engineer in the Xalan-dev group with whom i
can get help on this front. 
  
sorry if this is abrupt. I have tried emailing the xalan user mailing
lists earlier and did not solutions for my problems. 
  
one of these (the latest) is how to build xalan and xerces (above
versions) on solaris with the Sun Workshop (forte) 6 update 2 compiler
without the namespace - i need to know which are the correct options to
use + correct compiler and linker options - looks like the libraries
that your team provides at the download page are built using the same
compiler version, except that these are built with the namespace. 
  
i tried for a while following standard procedure, without much success
(got some more errors everytime i resolved some) and then finally gave
up and built xerces and xalan with gcc - this worked. However my product
itself must be built with forte compiler and i am not sure if i can mix
and match gcc-built libraries with my forte-built application binary. 
  
Would you be able to help me with this? also, i have a few more
questions. 
  
Let me know if and when i can call you if that will save some time for
you :) 
  
Thank you and looking forward to your expert advice. 

________________________________________________________________________
________ 
Ramkumar Devanathan 
HP Software R&D 
Bangalore 
India 
PHONE: (91)-080-2205-2219 
Ecard: http://www.ecardfile.com/id/ramkumardevanathan
<http://www.ecardfile.com/id/ramkumardevanathan>  
________________________________________________________________________
________ 

Find out what is happening in the ITRC and BSD Forums at
http://forums.itrc.hp.com <blocked::blocked::http://forums.itrc.hp.com/>
and http://bizforums.itrc.hp.com
<blocked::blocked::http://bizforums.itrc.hp.com/>