You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/01/03 12:01:32 UTC

DO NOT REPLY [Bug 38106] New: - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106

           Summary: xmlvalidate fails when apply to multiple fileset and
                    xml/xsl document with no schemaLocation specified
           Product: Ant
           Version: 1.6.5
          Platform: All
        OS/Version: other
            Status: NEW
          Severity: critical
          Priority: P1
         Component: Optional Tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: a_cogito@yahoo.fr


This task fails when more than one file is specified and the xsl/xml document
doesn't contains the schemaLocation.

example:

<xmlvalidate failonerror="yes" lenient="no" warn="yes">
<attribute name="http://xml.org/sax/features/validation" value="true"/>
<attribute name="http://apache.org/xml/features/validation/schema"  value="true"/>
<attribute name="http://xml.org/sax/features/namespaces" value="true"/>
<property
name="http://apache.org/xml/properties/schema/external-schemaLocation"
value="http://www.w3.org/1999/XSL/Transform
http://www.w3.org/2005/02/schema-for-xslt20.xsd"/>
<fileset dir="xsl-no-schemaLocation" includes="*.xsl"/>
</xmlvalidate>

You can find the <property> documentation here:
http://xerces.apache.org/xerces-j/properties.html

Has said in this doc:
"The XML Schema Recommendation explicitly states that the inclusion of
schemaLocation/ noNamespaceSchemaLocation attributes is only a hint(...)"

The W3C doc about this: http://www.w3.org/TR/xmlschema-1/#xsi_schemaLocation
"2.6.3 xsi:schemaLocation, xsi:noNamespaceSchemaLocation
The xsi:schemaLocation and xsi:noNamespaceSchemaLocation attributes can be used
in a document to provide hints as to the physical location of schema documents
which may be used for �assessment�. See How schema definitions are located on
the Web (�4.3.2) for details on the use of these attributes."


In my case, I have a lot of xsl with no schemaLocation specified.
I can't add the schemaLocation to all those files, so I need to specify the xsd
 location from "outside" (aka in the ant file).

I'll provide a showcase as an attachement of this bug.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106





------- Additional Comments From a_cogito@yahoo.fr  2006-01-03 15:21 -------
After further investigations, I found a patch but I not sure it's a xerces bug
or functionnality ?!

Somehow the properties set on the XMLReader are lost after the first parse on
the first file of fileset?!

According to the javadoc:
http://xerces.apache.org/xerces-j/apiDocs/org/xml/sax/XMLReader.html#setProperty(java.lang.String,%20java.lang.Object)

"Some property values may be immutable or mutable only in specific contexts,
such as before, during, or after a parse."

This could mean anything and it's contrary !

My solution is to set the properties every time we try do parse().
Since it's just setting values in a hashmap it's not time consuming.

see attached svn-patch.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106





------- Additional Comments From a_cogito@yahoo.fr  2006-01-03 15:22 -------
Created an attachment (id=17313)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17313&action=view)
set parser properties just before parse method


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106





------- Additional Comments From a_cogito@yahoo.fr  2006-01-03 12:02 -------
Created an attachment (id=17312)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17312&action=view)
build file and sample files


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106





------- Additional Comments From a_cogito@yahoo.fr  2006-01-04 16:55 -------
yes it does work with the SVN trunk :)

Thanks.
The performance issue is not a problem for me right now.

Feel free to close this bug or change it's status ;)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106





------- Additional Comments From stevel@apache.org  2006-01-03 22:27 -------
This should already be fixed in the SVN_HEAD version of Ant. please grab a copy
and see if the problem is fixed. There are gump tests that do bulk
<schemavalidate>, so I strongly believe it is fixed.

I think we actually do it less efficiently, by creating a new parser instance
each time, so it may give a performance boost to code

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38106] - xmlvalidate fails when apply to multiple fileset and xml/xsl document with no schemaLocation specified

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38106


bodewig@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7




------- Additional Comments From bodewig@apache.org  2006-01-28 15:32 -------
http://svn.apache.org/viewcvs.cgi?rev=278246&view=rev

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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