<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user">
    <title>gmane.text.xml.xerces-j.user</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5880"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5879"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5878"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5877"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5876"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5875"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5874"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5873"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5872"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5871"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5870"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5869"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5868"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5867"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5866"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5865"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5864"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5863"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5862"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5861"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5880">
    <title>RE: debugging tools?</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5880</link>
    <description>&lt;pre&gt;I’m specifically looking for a way to trace the evaluation of the Xpath expressions inside a schema &amp;lt;assertion&amp;gt;.  The tools you point to don’t  mention such a capability, and if they have it, it must be based on some underlying functionality in Xerces, so I was hoping someone could show me where the hooks to such a tracing capability would be.   (the specific problem that in the example that I sent around is that I have an &amp;lt;assertion&amp;gt; that should be rejecting a specific element in the document, but it is not. )

Thanks,
Jim

From: Mark R Maxey [mailto:Mark_R_Maxey&amp;lt; at &amp;gt;raytheon.com]
Sent: Thursday, May 09, 2013 10:45 AM
To: j-users&amp;lt; at &amp;gt;xerces.apache.org
Subject: Re: debugging tools?


I've foxy oxygen&amp;lt;http://www.oxygenxml.com/&amp;gt; and XMLSpy&amp;lt;http://www.altova.com/xmlspy.html&amp;gt; to be very helpful.

Mark Maxey
[Inactive hide details for Jim Barnett ---05/09/2013 09:31:58 AM---Are there tools that will help me debug a complex assertion?]Jim Barnett ---05/09/2013 09:31:58 AM---Are there tools that will help&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-05-09T17:56:48</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5879">
    <title>Re: debugging tools?</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5879</link>
    <description>&lt;pre&gt;For the example you've posted, there's no compilation error with
&amp;lt;assert&amp;gt; XPath expression and the &amp;lt;assert&amp;gt; has returned true for the
XML instance document you've posted.

The &amp;lt;assert&amp;gt; you've cited seems to have a lengthy XPath expression.
Unless there's a strong reason to write such lengthy &amp;lt;assert&amp;gt; XPath
expressions, these should be refactored (for example, by breaking
these into multiple asserts) to have a reasonable logical complexity.

On Thu, May 9, 2013 at 7:42 PM, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-05-09T15:24:19</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5878">
    <title>Re: debugging tools?</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5878</link>
    <description>&lt;pre&gt;I've foxy oxygen and XMLSpy to be very helpful.


Mark Maxey




From:Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt;
To:"j-users&amp;lt; at &amp;gt;xerces.apache.org" &amp;lt;j-users&amp;lt; at &amp;gt;xerces.apache.org&amp;gt;
Date:05/09/2013 09:31 AM
Subject:debugging tools?



Are there tools that will help me debug a complex assertion?  I’ve tried
using trace, but it doesn’t seem to print out messages when it’s inside an
‘every’ or a ‘some’.   I’ve attached the example I’m trying to debug.  The
assertion in line 26 of the schema should reject the &amp;lt;transition&amp;gt; in line 7
of sample.scxml, but it doesn’t (so validation succeeds).  I can’t tell if
there’s a logical error in my schema, or if I’m not using some element
correctly.  Can someone give me some hints on how to debug the assertion’s
application?

Thanks in advance,
Jim Barnett[attachment "sample.scxml" deleted by Mark R Maxey/US/Raytheon]
[attachment "test_schema.xsd" deleted by Mark R Maxey/US/Raytheon]
----------------------------------------------&lt;/pre&gt;</description>
    <dc:creator>Mark R Maxey</dc:creator>
    <dc:date>2013-05-09T14:45:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5877">
    <title>debugging tools?</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5877</link>
    <description>&lt;pre&gt;Are there tools that will help me debug a complex assertion?  I've tried using trace, but it doesn't seem to print out messages when it's inside an 'every' or a 'some'.   I've attached the example I'm trying to debug.  The assertion in line 26 of the schema should reject the &amp;lt;transition&amp;gt; in line 7 of sample.scxml, but it doesn't (so validation succeeds).  I can't tell if there's a logical error in my schema, or if I'm not using some element correctly.  Can someone give me some hints on how to debug the assertion's application?

Thanks in advance,
Jim Barnett
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe&amp;lt; at &amp;gt;xerces.apache.org
For additional commands, e-mail: j-users-help&amp;lt; at &amp;gt;xerces.apache.org&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-05-09T14:12:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5876">
    <title>Re: validating a XML file using XSD 1.1 with Xerces-J</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5876</link>
    <description>&lt;pre&gt;Dear Mukulg,

  I followed your suggestion and it worked ;-)

     Thanks

       Roberto

On Mon, Apr 22, 2013 at 2:39 PM, Mukul Gandhi &amp;lt;mukulg&amp;lt; at &amp;gt;apache.org&amp;gt; wrote:
&lt;/pre&gt;</description>
    <dc:creator>Roberto Marabini</dc:creator>
    <dc:date>2013-04-22T21:35:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5875">
    <title>Re: validating a XML file using XSD 1.1 with Xerces-J</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5875</link>
    <description>&lt;pre&gt;your XSD document specifies the concerned element declarations as follows,

&amp;lt;xsd:element name="defocusU" type="defocusType"  maxOccurs="1" minOccurs="0"/&amp;gt;
&amp;lt;xsd:element name="defocusV" type="defocusType" maxOccurs="1" minOccurs="0"/&amp;gt;

which means that these elements are optional.

Within your XML instance document, only the first &amp;lt;particle&amp;gt; element
has the above element instances. Your assertion, &amp;lt;xsd:assert
test="defocusU ge defocusV" /&amp;gt; succeeds on the &amp;lt;particle&amp;gt; which has
the elements defocusU and defocusV but fails on the other &amp;lt;particle&amp;gt;
elements. I think, the correct way to write your assertion would be,

&amp;lt;xsd:assert test="if (defocusU and defocusV) then (defocusU ge
defocusV) else true()" /&amp;gt;

Which will take care of the optional nature of these elements. Since
the complexType "defocusType" in your schema has simpleContent,
therefore "ge" operator would work fine as you're expecting.

On Mon, Apr 22, 2013 at 5:52 AM, Roberto Marabini &amp;lt;roberto&amp;lt; at &amp;gt;cnb.csic.es&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-22T12:39:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5874">
    <title>Re: problems using tokenize()</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5874</link>
    <description>&lt;pre&gt;Its my pleasure to be of help.

On Mon, Apr 22, 2013 at 2:49 AM, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-22T12:15:46</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5873">
    <title>validating a XML file using XSD 1.1 with Xerces-J</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5873</link>
    <description>&lt;pre&gt;Hi,

    I am trying to write a XSD 1.1 schema that uses  XSD 1.1
assertions. I am able to repeat the examples described in the URL:
http://mukulgandhi.blogspot.com.es/2009/11/xsd-11-some-xsd-11-samples-running-with.html
so I guess my xerces-j installation is OK.

   When I tried to include an assert in my schema (I reproduce part of
it in the email and attach the full file) I got the error message:

[Error] kk.emx:33:14: cvc-assertion.3.13.4.1: Assertion evaluation
('defocusU ge defocusV') for element 'particle' with type '#anonymous'
did not succeed.

but defocusU is indeed greater than defocusV

Note that the commented lines

&amp;lt;!-- &amp;lt;xsd:assert test="t34 le 3" /&amp;gt;--&amp;gt;
&amp;lt;!-- &amp;lt;xsd:assert test="&amp;lt; at &amp;gt;index le 3" /&amp;gt;--&amp;gt;

work properly when uncommented

but

        &amp;lt;xsd:assert test="defocusU ge defocusV" /&amp;gt;

does not. I guess the problem is that defocusU and defocusV are complextypes

any help will be welcomed

    thanks

               Roberto
=================

Schema

&amp;lt;?xml version="1.1" encoding="UTF-8"?&amp;gt;
&amp;lt;xsd:sche&lt;/pre&gt;</description>
    <dc:creator>Roberto Marabini</dc:creator>
    <dc:date>2013-04-22T00:22:32</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5872">
    <title>RE: problems using tokenize()</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5872</link>
    <description>&lt;pre&gt;Mukul,
Yes, you are right.  Count() works as you say.

Thank you for your help.


-          Jim

From: Mukul Gandhi [mailto:mukulg&amp;lt; at &amp;gt;apache.org]
Sent: Friday, April 19, 2013 12:30 AM
To: j-users&amp;lt; at &amp;gt;xerces.apache.org
Subject: Re: problems using tokenize()

Hi Jim,
 With a boolean() function around 'tokenize' call, an "effective boolean value" of xs:string* result of 'tokenize' will be returned. But this would result in an error as per XPath 2.0 spec, for your example. I imagine, an 'exists' or 'count' function around tokenize() would let you achieve the same purpose as matches().


Sent from a mobile device.

On Thursday, April 18, 2013, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;lt;mailto:Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt;&amp;gt; wrote:

--
Regards,
Mukul Gandhi&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-04-21T21:19:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5871">
    <title>Re: problems using tokenize()</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5871</link>
    <description>&lt;pre&gt;Hi Jim,
 With a boolean() function around 'tokenize' call, an "effective boolean
value" of xs:string* result of 'tokenize' will be returned. But this would
result in an error as per XPath 2.0 spec, for your example. I imagine, an
'exists' or 'count' function around tokenize() would let you achieve the
same purpose as matches().


Sent from a mobile device.

On Thursday, April 18, 2013, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:
As before, I have an element with an attribute &amp;lt; at &amp;gt;target with type idrefs.  I
want to split the value into the individual idrefs (I will run more
complicated tests on them, but for the moment I’m just trying to get access
to them).  In the attached document and schema, I have two assertions.  The
first, using matches() succeeds, but the second, using tokenize(), fails:
xpathDefaultNamespace="##targetNamespace"/&amp;gt;
xpathDefaultNamespace="##targetNamespace"/&amp;gt;

&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-19T04:30:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5870">
    <title>problems using tokenize()</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5870</link>
    <description>&lt;pre&gt;I'm having trouble getting tokenize() to behave the way I expect it to.  As before, I have an element with an attribute &amp;lt; at &amp;gt;target with type idrefs.  I want to split the value into the individual idrefs (I will run more complicated tests on them, but for the moment I'm just trying to get access to them).  In the attached document and schema, I have two assertions.  The first, using matches() succeeds, but the second, using tokenize(), fails:

&amp;lt;xsd:assert test="matches(string(&amp;lt; at &amp;gt;target), '\S+(\s+\S+)+')" xpathDefaultNamespace="##targetNamespace"/&amp;gt;
&amp;lt;xsd:assert test="boolean(tokenize(string(&amp;lt; at &amp;gt;target), '\s+'))"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;

What am I doing wrong?

Thanks,
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe&amp;lt; at &amp;gt;xerces.apache.org
For additional commands, e-mail: j-users-help&amp;lt; at &amp;gt;xerces.apache.org&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-04-18T15:30:04</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5869">
    <title>Re: regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5869</link>
    <description>&lt;pre&gt;I have no easy way to test it, but I think your expression could be simplified, ie.

test="if (matches(string(&amp;lt; at &amp;gt;target), '.*')) then true() else false()"

seems to be the same as

test="matches(string(&amp;lt; at &amp;gt;target), '.*'))"

I've checked the following URL:

http://www.w3.org/TR/xquery-operators/#func-matches

and it seems that "matches" returns xs:boolean:

fn:matches($input as xs:string?, $pattern as xs:string) as xs:boolean
Summary: The function returns true if $input matches the regular expression supplied as $pattern as influenced by the value of $flags, if present; otherwise, it returns false.

Best regards,
Dawid


W dniu 17.04.2013 19:28, Jim Barnett pisze:
&lt;/pre&gt;</description>
    <dc:creator>Dawid Chodura</dc:creator>
    <dc:date>2013-04-17T17:44:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5868">
    <title>RE: regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5868</link>
    <description>&lt;pre&gt;Mukul,
  Yes, that fixed it.  Thank you for your prompt reply.

- Jim

-----Original Message-----
From: Mukul Gandhi [mailto:mukulg&amp;lt; at &amp;gt;apache.org] 
Sent: Wednesday, April 17, 2013 12:26 PM
To: j-users&amp;lt; at &amp;gt;xerces.apache.org
Subject: Re: regular expression matching in &amp;lt;assert&amp;gt;

Hi Jim,
    Thanks for sending across the schema and XML instance documents. I looked at the schema document you've shared.

The following fix seems to work for your problem &amp;lt;assert&amp;gt;,

&amp;lt;xsd:assert test="if (matches(string(&amp;lt; at &amp;gt;target), '.*')) then true() else false()"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;

i.e, we use a string() function around attribute node &amp;lt; at &amp;gt;target. The 'target' attribute within your schema has type annotation of xsd:IDREFS, therefore we seem to need this workaround.

On Wed, Apr 17, 2013 at 9:06 PM, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:




--
Regards,
Mukul Gandhi

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe&amp;lt; at &amp;gt;xerces.apache.org
For additional &lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-04-17T17:28:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5867">
    <title>Re: regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5867</link>
    <description>&lt;pre&gt;Hi Jim,
    Thanks for sending across the schema and XML instance documents. I
looked at the schema document you've shared.

The following fix seems to work for your problem &amp;lt;assert&amp;gt;,

&amp;lt;xsd:assert test="if (matches(string(&amp;lt; at &amp;gt;target), '.*')) then true() else
false()"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;

i.e, we use a string() function around attribute node &amp;lt; at &amp;gt;target. The
'target' attribute within your schema has type annotation of
xsd:IDREFS, therefore we seem to need this workaround.

On Wed, Apr 17, 2013 at 9:06 PM, Jim Barnett &amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:




&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-17T16:26:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5866">
    <title>RE: regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5866</link>
    <description>&lt;pre&gt;Mukul,
  Thanks for your response.  I've attached a sample schema and test file (the schema is edited down from a much larger document, so it's structure may not make much sense.)   The problem is in the &amp;lt;assert&amp;gt; in line 74 of the schema.  (The simpler &amp;lt;assert&amp;gt; in line 73 works properly.)  

I suspect that you may be right about there being a namespace problem, because the &amp;lt;assert&amp;gt; in line 74 fails even if I wrap not() around it.  So both

&amp;lt;xsd:assert test="if (matches(&amp;lt; at &amp;gt;target, '.*')) then true() else false()"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;
And
&amp;lt;xsd:assert test="if not((matches(&amp;lt; at &amp;gt;target, '.*'))) then true() else false()"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;

both fail, which makes it look like the processor is not finding the matches() function.  

The 'xpathDefaultNamespace="##targetNamespace"' attribute is something I stumbled across when trying to get some other assertions to work, but I admit that I don't really understand what effects it may be having.  

Thank you for your help.  
&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-04-17T15:36:03</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5865">
    <title>Re: regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5865</link>
    <description>&lt;pre&gt;Hi Jim,
    Our XSD 1.1 &amp;lt;assert&amp;gt; implementation can use XPath 2.0 matches()
and tokenize() functions fine. Our &amp;lt;assert&amp;gt; XPath 2.0 processor passes
all W3C XPath 2.0 tests.

I've checked your example with current Xerces SVN, and I don't find
any bug wrt your example. I can see, that you use the
xpathDefaultNamespace attribute on &amp;lt;assert&amp;gt; which may be causing
issues.

If you can post a complete XSD schema document along with an XML
instance document, we could debug better.

On Wed, Apr 17, 2013 at 12:12 AM, Jim Barnett
&amp;lt;Jim.Barnett&amp;lt; at &amp;gt;genesyslab.com&amp;gt; wrote:



&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-17T14:54:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5864">
    <title>regular expression matching in &lt;assert&gt;</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5864</link>
    <description>&lt;pre&gt;Are matches() and tokenize() supported inside &amp;lt;assert&amp;gt; when doing schema validation?  I am applying an assertion to an element with a 'target' attribute whose value is "s1 s2", yet the following assertion is failing:

&amp;lt;xsd:assert test="if (matches(&amp;lt; at &amp;gt;target, '.*')) then true()  else false()"  xpathDefaultNamespace="##targetNamespace"/&amp;gt;

Any guidance would be appreciated.

Thanks,
Jim&lt;/pre&gt;</description>
    <dc:creator>Jim Barnett</dc:creator>
    <dc:date>2013-04-16T18:42:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5863">
    <title>Validate XML by XSD failes with jDOM and Xerces 2.10.0</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5863</link>
    <description>&lt;pre&gt;Hi list,

I've got a problem validating a xml by a xsd.

A short preview about the xsd:

&amp;lt;complexType name="MyType2"&amp;gt;
 &amp;lt;attribute name="MyAttribute" type="string" use="required" /&amp;gt;
&amp;lt;/complexType&amp;gt;

&amp;lt;complexType name="MyType1 ... /&amp;gt;

&amp;lt;element name="MyRoot"&amp;gt;
 &amp;lt;complexType&amp;gt;
  &amp;lt;choice&amp;gt;
   &amp;lt;element name="MyType1" ... /&amp;gt;
   &amp;lt;element name="MyType2" type="MyType2" minOccurs="1" maxOccurs="1" /&amp;gt;
  &amp;lt;/choice&amp;gt;
 &amp;lt;/complexType&amp;gt;
&amp;lt;/element&amp;gt;


Ok, my XML file looks like this:

&amp;lt;MyRoot xmlns="..." ...&amp;gt;
 &amp;lt;MyType2 MyAttribute="something"&amp;gt;
  ...
 &amp;lt;/MyType2&amp;gt;
&amp;lt;/MyRoot&amp;gt;


Now I try to validate this with jDOM by using xerces. Then I got the
following error:
 - Error on line 6: cvc-complex-type.3.2.2: Attribute "MyAttribute" must
not occur in element "MyType2".


I validated the same xml with the same xsd with oXygen (which also uses
xerces) and with some online validators. All told me that the xml is valid.

So my question is, why does the JAVA implementation gives tells me that
the xml is not valid.

I'm grateful for some hints.

Th&lt;/pre&gt;</description>
    <dc:creator>Ronny</dc:creator>
    <dc:date>2013-04-05T14:11:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5862">
    <title>Re: Validate XML by XSD failes with jDOM and Xerces 2.10.0</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5862</link>
    <description>&lt;pre&gt;

That is fine and then you should provide a Xerces jar within your
classpath, which you seem to have already done.


I'm really not sure, if substituting a latest Xerces jar within your
JDOM runtime classpath, may be sufficient to make available
functionality of this Xerces jar to your JDOM runtime. Your JDOM
runtime may be using Xerces in some other way.


As I wrote earlier, simply placing a new Xerces jar within your JDOM
classpath may not be a sufficient condition to make available
functionality of this Xerces jar to your JDOM application.

Therefore, my guess currently wrt this issue are,
1) Either JDOM doesn't support using new Xerces jars, in this way.
2) Or you may need to do a JDOM specific configuration, to be able to
use new Xerces jars

You may have to ask support for this query, to JDOM forum or if
someone here can provide a better explanation perhaps.


Sorry if this is not helpful.


&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-06T08:48:55</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5861">
    <title>Re: Validate XML by XSD failes with jDOM and Xerces 2.10.0</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5861</link>
    <description>&lt;pre&gt;Sorry. Of course I configured jdom to use the external xerces. Without 
putting the xerces jar into the class path I get errors.

Vom Handy gesendet.



Am 6. April 2013 10:48:55 schrieb Mukul Gandhi &amp;lt;mukulg&amp;lt; at &amp;gt;apache.org&amp;gt;:
&lt;/pre&gt;</description>
    <dc:creator>Ronny</dc:creator>
    <dc:date>2013-04-06T09:50:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5860">
    <title>Re: Validate XML by XSD failes with jDOM and Xerces 2.10.0</title>
    <link>http://permalink.gmane.org/gmane.text.xml.xerces-j.user/5860</link>
    <description>&lt;pre&gt;Does JDOM has a native Xerces-J XSD integration? If its kind of that,
then the XSD processor active within your JDOM runtime may have a
validator bug. If that is so, you may need to report this problem to
JDOM forum.

As far as I know, Xerces-J doesn't provide explicit JDOM integration.
Another approach you can try is if you're constrained to use a JDOM
representation of your input XML for XSD validation is to following
steps like below,
1) Serialize the JDOM tree into an XML document (like a file, string etc).
2) Then use result of step 1) and your XSD document, to do schema
validation with Xerces-J. This would also allow you to integrate an
externally available (which may have a better XSD compliance, that the
validator currently active in your JDOM implementation) Xerces-J
library, with your JDOM input.

Having written all of this, I really haven't verified the internals of
JDOM. Please correct me, if I'm wrong.

On Fri, Apr 5, 2013 at 7:41 PM, Ronny &amp;lt;Ronny&amp;lt; at &amp;gt;bigfunfitness.de&amp;gt; wrote:


--
Regards,
Mukul Gan&lt;/pre&gt;</description>
    <dc:creator>Mukul Gandhi</dc:creator>
    <dc:date>2013-04-06T03:29:40</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.text.xml.xerces-j.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.text.xml.xerces-j.user</link>
  </textinput>
</rdf:RDF>
