You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Richard Clarke (JIRA)" <xe...@xml.apache.org> on 2005/06/25 13:44:57 UTC
[jira] Commented: (XERCESC-1425) linking fails on OS X 10.4
[ http://issues.apache.org/jira/browse/XERCESC-1425?page=comments#action_12314483 ]
Richard Clarke commented on XERCESC-1425:
-----------------------------------------
Jeremy,
It may be cold comfort for you but I found builds under 10.4 to be smooth (and I'm not a Darwin
expert either), but see http://issues.apache.org/jira/browse/XERCESC-1432 .
Two things to check:
* Have you installed the Xcode 2.0 tools? You seem to be hitting library trouble and I think
that 2.0 probably uses libs tailored to Mac OS 10.4.
* I now use the bash shell that 10.4 favours. If you're still using tcsh then you should
consider switching because GCC 4.0 or make may be more in tune with it. Perhaps.
You might then get a different error report, even if nothing better.
Regards,
Richard Clarke
> linking fails on OS X 10.4
> --------------------------
>
> Key: XERCESC-1425
> URL: http://issues.apache.org/jira/browse/XERCESC-1425
> Project: Xerces-C++
> Type: Bug
> Components: Build
> Versions: 2.6.0
> Environment: XERCES: 2.6.0 source distribution
> UNAME: Darwin [...] 8.0.0 Darwin Kernel Version 8.0.0: Sat Mar 26 14:15:22 PST 2005; root:xnu-792.obj~1/RELEASE_PPC Power Macintosh powerpc
> GCC: gcc version 3.3 20030304 (Apple Computer, Inc. build 1671)
> Reporter: Jeremy McCormick
>
> I am unable to build Xerces-C++ 2.6.0 from source on Mac OS X 10.4
> following the instructions under "Building Xerces-C++ from the Mac OS X command line".
> http://xml.apache.org/xerces-c/build-other.html
> I configure like this as the instructions specify.
> ./runConfigure -p macosx -n native
> Compilation seems to complete fine, but then linking fails. By no
> means am I a Mac expert, but at least the instructions on this
> page do not work for me.
> Here is the complete linker command and the error message.
> Building /Users/jeremym/work/sim/xercesc/xerces-c-src_2_6_0/lib/libxerces-depdom.26.0.dylib
> c++ -DMACOSX -dynamiclib -install_name libxerces-depdom.26.dylib -o /Users/jeremym/work/sim/xercesc/xerces-c-src_2_6_0/lib/libxerces-depdom.26.0.dylib MACOSX/depdom/AttrImpl.o MACOSX/depdom/AttrMapImpl.o MACOSX/depdom/AttrNSImpl.o MACOSX/depdom/CDATASectionImpl.o MACOSX/depdom/CharacterDataImpl.o MACOSX/depdom/ChildNode.o MACOSX/depdom/CommentImpl.o MACOSX/depdom/DOMParser.o MACOSX/depdom/DOMString.o MACOSX/depdom/DOM_Attr.o MACOSX/depdom/DOM_CDATASection.o MACOSX/depdom/DOM_CharacterData.o MACOSX/depdom/DOM_Comment.o MACOSX/depdom/DOM_DOMException.o MACOSX/depdom/DOM_DOMImplementation.o MACOSX/depdom/DOM_Document.o MACOSX/depdom/DOM_DocumentFragment.o MACOSX/depdom/DOM_DocumentType.o MACOSX/depdom/DOM_Element.o MACOSX/depdom/DOM_Entity.o MACOSX/depdom/DOM_EntityReference.o MACOSX/depdom/DOM_NamedNodeMap.o MACOSX/depdom/DOM_Node.o MACOSX/depdom/DOM_NodeFilter.o MACOSX/depdom/DOM_NodeIterator.o MACOSX/depdom/DOM_NodeList.o MACOSX/depdom/DOM_Notation.o MACOSX/depdom/DOM_ProcessingInstruction.o MACOSX/depdom/DOM_Range.o MACOSX/depdom/DOM_RangeException.o MACOSX/depdom/DOM_Text.o MACOSX/depdom/DOM_TreeWalker.o MACOSX/depdom/DOM_XMLDecl.o MACOSX/depdom/DStringPool.o MACOSX/depdom/DeepNodeListImpl.o MACOSX/depdom/DocumentFragmentImpl.o MACOSX/depdom/DocumentImpl.o MACOSX/depdom/DocumentTypeImpl.o MACOSX/depdom/DomMemDebug.o MACOSX/depdom/ElementDefinitionImpl.o MACOSX/depdom/ElementImpl.o MACOSX/depdom/ElementNSImpl.o MACOSX/depdom/EntityImpl.o MACOSX/depdom/EntityReferenceImpl.o MACOSX/depdom/NamedNodeMapImpl.o MACOSX/depdom/NodeIDMap.o MACOSX/depdom/NodeImpl.o MACOSX/depdom/NodeIteratorImpl.o MACOSX/depdom/NodeListImpl.o MACOSX/depdom/NodeVector.o MACOSX/depdom/NotationImpl.o MACOSX/depdom/ParentNode.o MACOSX/depdom/ProcessingInstructionImpl.o MACOSX/depdom/RangeImpl.o MACOSX/depdom/RefCountedImpl.o MACOSX/depdom/TextImpl.o MACOSX/depdom/TreeWalkerImpl.o MACOSX/depdom/XMLDeclImpl.o -framework CoreServices -lpthread -L/usr/lib -L/Users/jeremym/work/sim/xercesc/xerces-c-src_2_6_0/lib -lxerces-c
> /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lpthread is not an object file (not allowed in a library)
> /usr/bin/libtool: can't locate file for: -lxerces-c
> /usr/bin/libtool: file: -lxerces-c is not an object file (not allowed in a library)
> /usr/bin/libtool: for architecture: cputype (16777234) cpusubtype (0) file: -lSystem is not an object file (not allowed in a library)
> make[1]: *** [/Users/jeremym/work/sim/xercesc/xerces-c-src_2_6_0/lib/libxerces-depdom.26.0.dylib] Error 1
> make[1]: Target `ALL' not remade because of errors.
> make: *** [/Users/jeremym/work/sim/xercesc/xerces-c-src_2_6_0/lib/.26.0.dylib] Error 2
> Any help would be appreciated.
> --Jeremy McCormick
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
RE: Removing XML header
Posted by Praveen Maruvekere <pr...@gmail.com>.
Hi Axel,
How do I search for the message ID
200503301757.34859.aweiss@informatik.hu-berlin.de ?
-----Original Message-----
From: Axel Weiß [mailto:aweiss@informatik.hu-berlin.de]
Sent: Saturday, June 25, 2005 3:37 PM
To: c-dev@xerces.apache.org
Subject: Re: Removing XML header
Praveen Maruvekere wrote:
> I have the following code to display my XML DOM document.
>
> I need to fix following things in this
>
> 1. I always get an XML header by default , is there an option to
> suppress this ?
Hi Praveen,
the domwriter always produces xml output that will be parsed again by a
dom parser without error. Since the xml header is mandatory by standard,
it is always written out.
> 2. If I delete and add new nodes it displays a blank line and
> indentation of the XML gets corrupted. Could any of you please throw
> some light on this?
Indention iteself consists of xml nodes (text nodes). If you manipulate
the dom tree and don't take care of the so called, ignorable
whitespaces, you surely will damage the previous indention.
You can switch on the 'pretty printing' feature (instead of switching it
off), in order to have indented xml output. Maybe you want to try my
alternative way of pretty pinting (see the mailing list archives, msg-id
<20...@informatik.hu-berlin.de>).
>
> Thanks for the help
>
> XMLCh tempStr[100];
> XMLString::transcode("LS", tempStr, 99);
NB: this transcode method will become deprecated, soon. You'd better use
XMLCh tempStr[3] = {chLatin_L, chLatin_S, chNull};
Cheers,
Axel
--
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Problems validating XML in HP-UX 11.11
Posted by Praveen Maruvekere <pr...@gmail.com>.
Hi ,
I am trying to validate XML against XSD using Xerces. It works fine in
solaris but I get the following error in HP.
Fatal Error at file , line 0, char 0
Message: An exception occurred! Type:TranscodingException, Message:Unicode
char 0x2130 is not representable in encoding ISO8859-1
Fatal Error at file Validate, line 1, char 122
Message: Fatal error encountered during schema scan
Second problem is
I always get an error targetNameSpace is different than instance document.
How do I validate with having targetNameSpace. Is it necessarry to have
targetNameSpace always in "XSD" and xmlns in "XML" ?
Am I doing something wrong over here ?? Please help
Below is the XSD and XML file.
******************XSD
FILE***********************************************************************
<?xml version='1.0' encoding='ISO-8859-1'?>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://www.xmlmind.com/xmleditor/schema/example2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:e2="http://www.xmlmind.com/xmleditor/schema/example2"
xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
<xs:element name="doc">
<xs:complexType>
<xs:sequence>
<xs:element type="e2:Para" maxOccurs="unbounded" name="para"
minOccurs="1"></xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Para" mixed="true">
<xs:attribute default="left" name="align"
type="e2:Align"></xs:attribute>
</xs:complexType>
<xs:simpleType name="Align">
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>
******************END OF XSD
FILE************************************************************
******************XML
FILE***********************************************************************
<?xml version="1.0" encoding="UTF-8" ?>
<doc xmlns="http://www.xmlmind.com/xmleditor/schema/example2">
<para>abdc</para>
<para>fgf</para>
</doc>
******************END OF XML
FILE************************************************************
-Regards
Praveen
Re: Removing XML header
Posted by da...@us.ibm.com.
> > I have the following code to display my XML DOM document.
> >
> > I need to fix following things in this
> >
> > 1. I always get an XML header by default , is there an option to
> > suppress this ?
>
> Hi Praveen,
>
> the domwriter always produces xml output that will be parsed again by a
> dom parser without error. Since the xml header is mandatory by standard,
> it is always written out.
The XML declaration is not mandatory. XML version 1.0 documents encoded
in UTF-8 (or a compatible subset), or UTF-16 with the appropriate BOM, do
not require an XML declaration. But I do think it's a good idea to have
one anyway.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Re: Removing XML header
Posted by Axel Weiß <aw...@informatik.hu-berlin.de>.
Praveen Maruvekere wrote:
> I have the following code to display my XML DOM document.
>
> I need to fix following things in this
>
> 1. I always get an XML header by default , is there an option to
> suppress this ?
Hi Praveen,
the domwriter always produces xml output that will be parsed again by a
dom parser without error. Since the xml header is mandatory by standard,
it is always written out.
> 2. If I delete and add new nodes it displays a blank line and
> indentation of the XML gets corrupted. Could any of you please throw
> some light on this?
Indention iteself consists of xml nodes (text nodes). If you manipulate
the dom tree and don't take care of the so called, ignorable
whitespaces, you surely will damage the previous indention.
You can switch on the 'pretty printing' feature (instead of switching it
off), in order to have indented xml output. Maybe you want to try my
alternative way of pretty pinting (see the mailing list archives, msg-id
<20...@informatik.hu-berlin.de>).
>
> Thanks for the help
>
> XMLCh tempStr[100];
> XMLString::transcode("LS", tempStr, 99);
NB: this transcode method will become deprecated, soon. You'd better use
XMLCh tempStr[3] = {chLatin_L, chLatin_S, chNull};
Cheers,
Axel
--
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
Removing XML header
Posted by Praveen Maruvekere <pr...@gmail.com>.
I have the following code to display my XML DOM document.
I need to fix following things in this
1. I always get an XML header by default , is there an option to suppress
this ?
2. If I delete and add new nodes it displays a blank line and indentation of
the XML gets corrupted. Could any of you please throw some light on this?
Thanks for the help
XMLCh tempStr[100];
XMLString::transcode("LS", tempStr, 99);
DOMImplementation *impl
DOMImplementationRegistry::getDOMImplementation(tempStr);
DOMWriter* theSerializer = ((DOMImplementationLS*)impl)->createDOMWriter();
// optionally you can set some features on this serializer
if (theSerializer->canSetFeature(XMLUni::fgDOMWRTDiscardDefaultContent,
true))
theSerializer->setFeature(XMLUni::fgDOMWRTDiscardDefaultContent,
false);
if (theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true))
theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, false);
XMLFormatTarget *myFormTarget;
myFormTarget = new StdOutFormatTarget();
DOMDocument* Domdoc =
(DOMDocument*)theLiaisonPtr->mapToXercesDocument(theDocumentPtr);
DOMNode *doc = Domdoc->getDocumentElement();
theSerializer->writeNode(myFormTarget, *Domdoc);
delete theSerializer;
delete myFormTarget;