You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xmlbeans.apache.org by Chris <ch...@hmgcc.gsi.gov.uk> on 2007/02/06 16:38:08 UTC

Re: XmlBeans bugs involving comments and processing instructions

I am using XML Beans to do schema validation and would like to add XPath 
2.0 support.  Presumably to get the full benefit of XPath 2.0 (I'm 
specifically thinking of Schema Types), I'd need to use the latest 
version of Saxon-SA.
Does XML Beans support the SA version as well as Saxon-B?

When can we expect an XML Beans *release* with Saxon 8.8 (SA and or B) 
support? How stable are the current SVN versions (rev 500554?)?

Thanks
Chris
HMGCC

Cezar Andrei wrote:
> I just checked in (rev 500554) which will automatically download
> saxonb8-8j.zip. Build and checkin tests seem to be working fine.
> 
> Don't forget to do an "ant clean.jars" and "ant deploy" to pick up the
> new zip.
> 
> Cezar
> 
> 
>>-----Original Message-----
>>From: Radu Preotiuc-Pietro
>>Sent: Friday, January 26, 2007 10:10 PM
>>To: dev@xmlbeans.apache.org
>>Subject: Re: XmlBeans bugs involving comments and processing
> 
> instructions
> 
>>Could you try your test with Saxon 8.8.0.6 if it's not too much
> 
> trouble?
> 
>>I have run XmlBeans with Saxon 8.8 a couple of months ago and it
> 
> worked
> 
>>just fine.
>>
>>Radu
>>
>>On Fri, 2007-01-26 at 13:57 -0800, cbryant wrote:
>>
>>>After further investigation, it appears that the latter (XPath) bug
> 
> is
> 
>>>actually in the Saxon code
>>
>>(net.sf.saxon.dom.NodeWrapper.getStringValueCS()
>>
>>>blindly appends the text values of all child nodes, regardless of
> 
> type).
> 
>>>The good news is that it looks like this bug was fixed somewhere
> 
> between
> 
>>>8.6.1 (the version supported by XmlBeans) and 8.8.0.6 (the current
>>
>>version).
>>
>>>In 8.8.0.6, net.sf.saxon.jdom.NodeWrapper.getStringValueCS()
> 
> utilizes
> 
>>the
>>
>>>org.jdom.Element.getValue() method, which complies with the Xml 1.0
>>>specification by concatenating the values of all descendant text
> 
> nodes.
> 
>>>In the meantime, I guess we'll have to wait until XmlBeans becomes
>>>synchronized with a more recent version of Saxon.
>>>
>>>-Coram
>>>
>>>
>>>
>>>cbryant wrote:
>>>
>>>>
>>>>This apparent bug becomes more critical when evaluating XPath
>>
>>expressions.
>>
>>>>It appears that the same value returned by getTextValue is that
> 
> which
> 
>>is
>>
>>>>passed on to the Saxon XPath engine for evaluating element values,
> 
> as
> 
>>the
>>
>>>>following test shows:
>>>>
>>>>String xml = "<element><!--A Comment-->999<?PI A Processing
>>>>Instruction?></element>";
>>>>XmlObject xo = XmlObject.Factory.parse(xml);
>>>>xo.selectPath("/element = 3");
>>>>
>>>>This code snippet causes a Saxon ValidationException, with the
>>
>>message:
>>
>>>>Cannot convert string " A Comment 999A Processing Ins..." to a
> 
> double
> 
>>>>
>>>>If these results are a side-effect of misunderstanding, then we
> 
> would
> 
>>>>greatly appreciate some insight.  Otherwise, we're not sure how to
>>
>>enter
>>
>>>>them as bugs, other than to post on this forum.
>>>>
>>>>Thanks,
>>>>Coram
>>>>
>>>>
>>>
> _______________________________________________________________________
> 
>>Notice:  This email message, together with any attachments, may
> 
> contain
> 
>>information  of  BEA Systems,  Inc.,  its subsidiaries  and
> 
> affiliated
> 
>>entities,  that may be confidential,  proprietary,  copyrighted
> 
> and/or
> 
>>legally privileged, and is intended solely for the use of the
> 
> individual
> 
>>or entity named in this message. If you are not the intended
> 
> recipient,
> 
>>and have received this message in error, please immediately return
> 
> this
> 
>>by email and then delete it.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
>>For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
> 
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
> 
> PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET.
> On entering the GSI, this email was scanned for viruses by the Government Secure Intranet (GSi) virus scanning service supplied exclusively by Cable & Wireless in partnership with MessageLabs.
> In case of problems, please call your organisational IT Helpdesk.
> The MessageLabs Anti Virus Service is the first managed service to achieve the CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK Government quality mark initiative for information security products and services.  For more information about this please visit www.cctmark.gov.uk
> 

-- 
Chris
HMGCC

The information contained in this message (and any attachments) may
be confidential and is intended for the sole use of the named addressee.
Access, copying, alteration or re-use of the e-mail by anyone other
than the intended recipient is unauthorised. If you are not the intended
recipient please advise the sender immediately by returning the e-mail
and deleting it from your system.

This information may be exempt from disclosure under Freedom Of Information 
Act 2000 and may be subject to exemption under other UK information 
legislation. Refer disclosure requests to the Information Officer.


The original of this email was scanned for viruses by Government Secure Intranet (GSi)  virus scanning service supplied exclusively by Cable & Wireless in partnership with MessageLabs.
On leaving the GSI this email was certified virus free.
The MessageLabs Anti Virus Service is the first managed service to achieve the CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007), the UK Government quality mark initiative for information security products and services.  For more information about this please visit www.cctmark.gov.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


RE: XmlBeans bugs involving comments and processing instructions

Posted by Cezar Andrei <ce...@bea.com>.
I haven't tried Saxon-SA, just the B available from
saxon.sourceforge.net. XMLBeans also works with BEA's XQuery engine
which is included in most of BEA's products.

The current SVN versions are quite stable; you should be safe using
them. We should wrap up a new release as soon as we'll have some time
available.

Cezar

> -----Original Message-----
> From: Chris [mailto:chrishe@hmgcc.gsi.gov.uk]
> Sent: Tuesday, February 06, 2007 9:38 AM
> To: dev@xmlbeans.apache.org
> Subject: Re: XmlBeans bugs involving comments and processing
instructions
> 
> I am using XML Beans to do schema validation and would like to add
XPath
> 2.0 support.  Presumably to get the full benefit of XPath 2.0 (I'm
> specifically thinking of Schema Types), I'd need to use the latest
> version of Saxon-SA.
> Does XML Beans support the SA version as well as Saxon-B?
> 
> When can we expect an XML Beans *release* with Saxon 8.8 (SA and or B)
> support? How stable are the current SVN versions (rev 500554?)?
> 
> Thanks
> Chris
> HMGCC
> 
> Cezar Andrei wrote:
> > I just checked in (rev 500554) which will automatically download
> > saxonb8-8j.zip. Build and checkin tests seem to be working fine.
> >
> > Don't forget to do an "ant clean.jars" and "ant deploy" to pick up
the
> > new zip.
> >
> > Cezar
> >
> >
> >>-----Original Message-----
> >>From: Radu Preotiuc-Pietro
> >>Sent: Friday, January 26, 2007 10:10 PM
> >>To: dev@xmlbeans.apache.org
> >>Subject: Re: XmlBeans bugs involving comments and processing
> >
> > instructions
> >
> >>Could you try your test with Saxon 8.8.0.6 if it's not too much
> >
> > trouble?
> >
> >>I have run XmlBeans with Saxon 8.8 a couple of months ago and it
> >
> > worked
> >
> >>just fine.
> >>
> >>Radu
> >>
> >>On Fri, 2007-01-26 at 13:57 -0800, cbryant wrote:
> >>
> >>>After further investigation, it appears that the latter (XPath) bug
> >
> > is
> >
> >>>actually in the Saxon code
> >>
> >>(net.sf.saxon.dom.NodeWrapper.getStringValueCS()
> >>
> >>>blindly appends the text values of all child nodes, regardless of
> >
> > type).
> >
> >>>The good news is that it looks like this bug was fixed somewhere
> >
> > between
> >
> >>>8.6.1 (the version supported by XmlBeans) and 8.8.0.6 (the current
> >>
> >>version).
> >>
> >>>In 8.8.0.6, net.sf.saxon.jdom.NodeWrapper.getStringValueCS()
> >
> > utilizes
> >
> >>the
> >>
> >>>org.jdom.Element.getValue() method, which complies with the Xml 1.0
> >>>specification by concatenating the values of all descendant text
> >
> > nodes.
> >
> >>>In the meantime, I guess we'll have to wait until XmlBeans becomes
> >>>synchronized with a more recent version of Saxon.
> >>>
> >>>-Coram
> >>>
> >>>
> >>>
> >>>cbryant wrote:
> >>>
> >>>>
> >>>>This apparent bug becomes more critical when evaluating XPath
> >>
> >>expressions.
> >>
> >>>>It appears that the same value returned by getTextValue is that
> >
> > which
> >
> >>is
> >>
> >>>>passed on to the Saxon XPath engine for evaluating element values,
> >
> > as
> >
> >>the
> >>
> >>>>following test shows:
> >>>>
> >>>>String xml = "<element><!--A Comment-->999<?PI A Processing
> >>>>Instruction?></element>";
> >>>>XmlObject xo = XmlObject.Factory.parse(xml);
> >>>>xo.selectPath("/element = 3");
> >>>>
> >>>>This code snippet causes a Saxon ValidationException, with the
> >>
> >>message:
> >>
> >>>>Cannot convert string " A Comment 999A Processing Ins..." to a
> >
> > double
> >
> >>>>
> >>>>If these results are a side-effect of misunderstanding, then we
> >
> > would
> >
> >>>>greatly appreciate some insight.  Otherwise, we're not sure how to
> >>
> >>enter
> >>
> >>>>them as bugs, other than to post on this forum.
> >>>>
> >>>>Thanks,
> >>>>Coram
> >>>>
> >>>>
> >>>
> >
_______________________________________________________________________
> >
> >>Notice:  This email message, together with any attachments, may
> >
> > contain
> >
> >>information  of  BEA Systems,  Inc.,  its subsidiaries  and
> >
> > affiliated
> >
> >>entities,  that may be confidential,  proprietary,  copyrighted
> >
> > and/or
> >
> >>legally privileged, and is intended solely for the use of the
> >
> > individual
> >
> >>or entity named in this message. If you are not the intended
> >
> > recipient,
> >
> >>and have received this message in error, please immediately return
> >
> > this
> >
> >>by email and then delete it.
> >>
>
>>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> >>For additional commands, e-mail: dev-help@xmlbeans.apache.org
> >
> >
> >
_______________________________________________________________________
> > Notice:  This email message, together with any attachments, may
contain
> > information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> > entities,  that may be confidential,  proprietary,  copyrighted
and/or
> > legally privileged, and is intended solely for the use of the
individual
> > or entity named in this message. If you are not the intended
recipient,
> > and have received this message in error, please immediately return
this
> > by email and then delete it.
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> >
> >
> > PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET.
> > On entering the GSI, this email was scanned for viruses by the
> Government Secure Intranet (GSi) virus scanning service supplied
> exclusively by Cable & Wireless in partnership with MessageLabs.
> > In case of problems, please call your organisational IT Helpdesk.
> > The MessageLabs Anti Virus Service is the first managed service to
> achieve the CSIA Claims Tested Mark (CCTM Certificate Number
> 2006/04/0007), the UK Government quality mark initiative for
information
> security products and services.  For more information about this
please
> visit www.cctmark.gov.uk
> >
> 
> --
> Chris
> HMGCC
> 
> The information contained in this message (and any attachments) may
> be confidential and is intended for the sole use of the named
addressee.
> Access, copying, alteration or re-use of the e-mail by anyone other
> than the intended recipient is unauthorised. If you are not the
intended
> recipient please advise the sender immediately by returning the e-mail
> and deleting it from your system.
> 
> This information may be exempt from disclosure under Freedom Of
> Information
> Act 2000 and may be subject to exemption under other UK information
> legislation. Refer disclosure requests to the Information Officer.
> 
> 
> The original of this email was scanned for viruses by Government
Secure
> Intranet (GSi)  virus scanning service supplied exclusively by Cable &
> Wireless in partnership with MessageLabs.
> On leaving the GSI this email was certified virus free.
> The MessageLabs Anti Virus Service is the first managed service to
achieve
> the CSIA Claims Tested Mark (CCTM Certificate Number 2006/04/0007),
the UK
> Government quality mark initiative for information security products
and
> services.  For more information about this please visit
www.cctmark.gov.uk
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org