|
|
Subject: Re: Entity tags and xerces - msg#00048
List: text.xml.xerces-c.user
Can anyone give more pointers to solving this problem?
On 4/24/07, Madhu Lagu <madhuwati@xxxxxxxxx> wrote:
On 4/24/07, David Bertoni <dbertoni@xxxxxxxxxx> wrote:
>
> Madhu Lagu wrote:
> > On 4/23/07, David Bertoni <dbertoni@xxxxxxxxxx> wrote:
> >>
> >> Madhu Lagu wrote:
> >> > Thanks for pointing out the errors, but it still does not work
> after
> >> > correcting the errors.
> ...
>
> >> >
> >> > This Xpath works: /Configuration/test/text()
> >> > This does not :-(
> /Configuration/Component/element/property[1]/text()
> >>
> >> What XPath implementation are you using? Xerces-C doesn't provide
> >> such an
> >> implementation.
> >>
> >> If I use Xalan-C's sample program SimpleXPathAPI, I get the expected
> >> result. Is that what you're using? If so, you need to post your
> >> question
> >> on the Xalan-C User list along with your code.
> >>
> >> If you're using some other implementation, you need to ask on another
>
> >> mailing list.
> >
> >
> > I am using the XPath implementation from xalan but the xerces-c
> dombuilder,
> > parser.
>
> The perhaps you need to disable the option to create entity references
> nodes. Otherwise, the DOM is not compatible with Xalan-C, and the
> entity
> is represented by an entity reference node, and not the expanded value:
>
> http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderFeatures
>
> builder->setFeature(XMLUni::fgDOMEntities, false);
I did set this to false. Also I set these other options to true:
fgDOMValidation, fgDOMNamespaces, fgXercesSchema,
fgXercesSchemaFullChecking, fgDOMDatatypeNormalization,
fgDOMValidateIfSchema
Also I am using xerces 2.7 and xalan 1.10.
The way I am using xalan and xerces to parse Xml files works perfectly
fine for all XPaths except the ones in which the xml files are referencing
each other using entity tags.
Dave
>
--
- Madhu
Cell: +91-98499-92972
--
- Madhu
Cell: +91-98499-92972
Was this page helpful?
Thread at a glance:
Previous Message by Date:
click to view message preview
Re: Building Xerces from SVN
David Bertoni wrote:
> Mateusz Loskot wrote:
>> David Bertoni wrote:
>>> Mateusz Loskot wrote:
>>>> Am I doing anything wrong here?
>>> I don't think so. I looks like your platform has defined "not" as a
>>> macro for "!" and that's causing problems with the local variable
>>> "not." What platform and compiler are you using?
>>
>> GNU/Linux, Ubuntu 6.10
>> $ gcc --version
>> gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5)
>>
>>> What happens if you rename that variable to something else?
>>
>> Yes, it works.
>> I renamed not to notation and it compiles now.
>>
>> See attached diff file.
>
> I've already committed a patch for this problem. Please let me know if
> you have problems with it. I just built the patch on Ubuntu 7.04, so it
> should also work for you.
David,
Yes, it works now.
Thank you all for your help!
Cheers
--
Mateusz Loskot
http://mateusz.loskot.net
Next Message by Date:
click to view message preview
Compiling with Xerces-C on AIX 5.2
Hi,
I am building an app on AIX 5.2 and am linking to the Xerces-C_2_7 library.
I have built the application with dynamic-linking to Xerces, but I'm
wondering is there a way to link statically to Xerces? I've seen
references to "XML_LIBRARY" in the mailing-list, but dealing with VC++ on
Windows. Is this applicable and sufficient to link statically on AIX?
Thanks,
Matthew Smith
First Data Merchant Services
e-mail: matthew.smith@xxxxxxxxxxxxx
phone: 410 527-2966
-----------------------------------------
The information in this message may be proprietary and/or
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or an employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify First Data
immediately by replying to this message and deleting it from your
computer.
Previous Message by Thread:
click to view message preview
Re: Entity tags and xerces
On 4/24/07, David Bertoni <dbertoni@xxxxxxxxxx> wrote:
Madhu Lagu wrote:
> On 4/23/07, David Bertoni <dbertoni@xxxxxxxxxx> wrote:
>>
>> Madhu Lagu wrote:
>> > Thanks for pointing out the errors, but it still does not work after
>> > correcting the errors.
...
>> >
>> > This Xpath works: /Configuration/test/text()
>> > This does not :-( /Configuration/Component/element/property[1]/text()
>>
>> What XPath implementation are you using? Xerces-C doesn't provide
>> such an
>> implementation.
>>
>> If I use Xalan-C's sample program SimpleXPathAPI, I get the expected
>> result. Is that what you're using? If so, you need to post your
>> question
>> on the Xalan-C User list along with your code.
>>
>> If you're using some other implementation, you need to ask on another
>> mailing list.
>
>
> I am using the XPath implementation from xalan but the xerces-c
dombuilder,
> parser.
The perhaps you need to disable the option to create entity references
nodes. Otherwise, the DOM is not compatible with Xalan-C, and the entity
is represented by an entity reference node, and not the expanded value:
http://xml.apache.org/xerces-c/program-dom.html#DOMBuilderFeatures
builder->setFeature(XMLUni::fgDOMEntities, false);
I did set this to false. Also I set these other options to true:
fgDOMValidation, fgDOMNamespaces, fgXercesSchema,
fgXercesSchemaFullChecking, fgDOMDatatypeNormalization,
fgDOMValidateIfSchema
Also I am using xerces 2.7 and xalan 1.10.
The way I am using xalan and xerces to parse Xml files works perfectly fine
for all XPaths except the ones in which the xml files are referencing each
other using entity tags.
Dave
--
- Madhu
Cell: +91-98499-92972
Next Message by Thread:
click to view message preview
Fw: Call for Papers Opens for ApacheCon US 2007
In case anyone is interested in participating this year now is the time to
submit proposals.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx
Rich Bowen <rbowen@xxxxxxxxxxx> wrote on 04/16/2007 10:50:54 AM:
> PMCs, please send this announcement to your various users@ and devs@
> mailing lists, as appropriate for your particular community.
> Remember, your project can only be represented at ApacheCon if your
> community submits talks proposals:
>
>
> ----------------------------
>
>
> Call for Papers Opens for ApacheCon US 2007
>
> The Call for Papers is now open for ApacheCon US, to be held November
> 12-16 at the Peachtree Westin, Atlanta. The conference will consist
> of two day of tutorials (November 12-13) and three days of regular
> conference sessions (November 14-16).
>
> Please log in to the website at http://apachecon.com/html/login.html
> to submit your proposal. Further details about fees and are
> avaialable on the CFP form.
>
> Topics appropriate for submission to this conference are manifold,
> and may include but are not restricted to:
>
> * ASF projects
> * ASF-Incubated projects
> * Scripting languages and dynamic content such as Java, Perl, Python,
> Ruby, XSL, and PHP
> * New technologies and broader initiatives such as Web Services and
> Web 2.0
> * Security and e-commerce, performance tuning, load balancing, and
> high availability
> * Business and community issues surrounding the ASF and Open Source
>
> The paper submission deadline is Monday, 28 April 2007, Midnight GMT.
>
> Thanks, and we hope to hear from you, and to see you in Atlanta.
> --
> The ApacheCon Planners
> planners-2007-us@xxxxxxxxxxxxx
|
|