SOLVED: XSD validation performance disaster

Is it possible to speed-up XMLType schemaValidate() and isSchemaValid() functions somehow?
The following statement take ~one second of CPU time per table row on Pentium4:
update tbl set is_valid = func(xml);
where func(xml) is begin return xml.isSchemaValid('schema.xsd'); end;
Looks like like full XSD re-parse for every row.
The xml is 600 bytes long on average and schema is 40k formated text. The XML column is non-schema based XMLType. The schema name is constant, but I need to process relatively large number of xml fragments.
Server is 10.2.0.3 so bug 5099703 does not apply.
I see two complimentary options:
- load Xerces2-J and validate with grammar caching, and hope it may be faster;
- split the work between dbms_scheduler one-shot jobs to do processing in parallel, or maybe just parallel update will be enough.
But keeping it simple would be the best option at all.

I hope my solution will be in help for someone struggling with pure performance of PL/SQL XMLType validation functions.
The performance in my case is two orders of magnitute better now: 80 rows/sec instead of 1 row/sec.
I created custom function that could be used as:
update messages set xml_is_valid =
    decode(xml_validator.isSchemaValid(xmlserialize(content xml), 'KRFileR.xsd'), 1, 'Y', 'N') The XML_VALIDATOR package is:
create or replace package xml_validator as
function isSchemaValid(xml clob, schema varchar2) return number;
procedure schemaValidate(xml clob, schema varchar2);
end;
show err
create or replace package body xml_validator as
function isSchemaValid(xml clob, schema varchar2) return number
    as language java
    name 'xmlvalidator.XMLValidator.isSchemaValid(
        oracle.sql.CLOB,
        java.lang.String
        ) return int';
procedure schemaValidate(xml clob, schema varchar2)
    as language java
    name 'xmlvalidator.XMLValidator.schemaValidate(
        oracle.sql.CLOB,
        java.lang.String
end;
show errThe XMLValidator class itself:
package xmlvalidator;
import java.io.IOException;
import java.io.ByteArrayOutputStream;
import java.io.StringReader;
import java.util.HashMap;
import java.sql.SQLException;
import oracle.xml.parser.v2.*;
import oracle.xml.parser.schema.*;
import oracle.sql.CLOB;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
public class XMLValidator {
  //protected static HashMap<String, DOMParser> cache = new HashMap<String, DOMParser>();
    protected static HashMap cache = new HashMap(); // oracle java is 1.4
    protected static EntityResolver resolver = new OracleSchemaEntityResolver();
    protected static ByteArrayOutputStream errors = new ByteArrayOutputStream();
    public static String getErrors() {
        return errors.toString();
    // mimick XMLType functions semantic
    public static int isSchemaValid(CLOB xml, String schema) {
        try {
            schemaValidate(xml, schema);
        } catch (Exception e) {
            return 0;
        return 1;
    public static void schemaValidate(CLOB xml, String schema)
            throws XMLParseException, SAXException, IOException, XSDException, SQLException {
      //DOMParser parser = cache.get(schema);
        DOMParser parser = (DOMParser)cache.get(schema);
        if (parser == null) {
            XSDBuilder xsdbuild = new XSDBuilder();
            xsdbuild.setEntityResolver(resolver);
            XMLSchema xmlschema = xsdbuild.build(resolver.resolveEntity(null, schema));
            parser = new DOMParser();
            parser.setXMLSchema(xmlschema);
            parser.setValidationMode(XMLParser.SCHEMA_VALIDATION);
            parser.setErrorStream(errors);
            cache.put(schema, parser); // the whole parser is cached to avoid unknown
                                       // hidden costs of creating new parser
        errors.reset();
        parser.reset();
        parser.parse(new InputSource(xml.getCharacterStream()));
        parser.reset();
}The OracleSchemaEntityResolver class to pull schema definition from Oracle registered schemas:
package xmlvalidator;
import oracle.xml.parser.schema.*;
import oracle.xml.parser.v2.*;
import java.net.*;
import java.io.*;
import org.w3c.dom.*;
import org.xml.sax.*;
import java.util.*;
import java.sql.*;
import oracle.jdbc.*;
public class OracleSchemaEntityResolver implements EntityResolver {
    protected static Connection conn;
    protected static PreparedStatement stmt;
    static {
        try {
            conn = DriverManager.getConnection("jdbc:default:connection:");
            stmt = conn.prepareStatement(
                "select xmlserialize(document schema) schema from user_xml_schemas where schema_url = ?"
        } catch(Exception e) { throw new RuntimeException(e); }
    public InputSource resolveEntity(String targetNS, String systemId)
            throws SAXException, IOException {
        Reader r;
      //System.out.println("resolving: " + targetNS + ":" + systemId);
        try {
            stmt.setString(1, systemId);
            ResultSet rs = stmt.executeQuery();
            rs.next();
            r = rs.getCharacterStream(1);
            rs.close(); // CLOB locator should be still valid even after ResultSet is closed
        } catch(SQLException e) { throw new RuntimeException(e); }
        InputSource src = new InputSource(r);
        src.setSystemId(systemId);
        return src;
}Create JAR with makejar.bat:
del XMLValidator.jar
cd XMLValidator/src
jar cf ../../XMLValidator.jar xmlvalidator/XMLValidator.java xmlvalidator/OracleSchemaEntityResolver.java
pauseLoad into database with load.bat:
set u=scott/qwerty@//server.domain.com:1521/orcl
set r="((* SCOTT)(* PUBLIC)(* SYS))"
call loadjava -thin -force -user %u% -resolver %r% -resolve XMLValidator.jar
pauseEnjoy!

Similar Messages

  • XSd-validation isn't performed when invoking file Adapter

    I've configured an ESB where data needs to be transformed using a file adapter and a db adapter.
    The deleimted files first need to be validated using xsd (native transformation) and if validation was performed correctly they can be transformed and loaded into db tables.
    The xsd-validation isn't performed in my use case where some fields are required, have a decimal-format etc., if the files don't comply they're still picked up and being transformed to the db adapter, where the insertion will fail then because the file had errored records in it.
    I'm using esb 10.1.3.3 in this case.
    kind regards,
    Nathalie

    Hi Nathalie,
    I'm not able to define properties on my esb routing
    service in release 10.1.3.3, the definition tab isn't
    showing any detailed information for my routing
    service.Strange, we're also using 10.1.3.3. Make sure in the ESB Control when you select the routing service, that the operation for which you want to validate the payload is selected. If it is selected, the operation details section should show the validation option. Also see page 3-14 of the ESB Developers Guide. You can also change the esbsv-file:
    <operations>
    <operationInfo guid="xyz" qname="Test.Insert.insert" wsdlOperation="insert" mepDisplayName="One Way" mep="OneWay">
    <request validate="true" xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/d
    b/top/Insert" element="tns:TestCollection"/>
    </operationInfo>
    </operations>
    </service>
    using the validate="true" option.
    No logging is being generated for this matter, so I'm
    not sure which problem I'm facing wright now. I will
    bounce the service and try again.We had such an issue when we didn't validate payload at runtime and inserted data using DB adapter. Our TopLink mappings didn't correspond to the XML data to be inserted. That caused only 2 tables out of 4 to be updated, without any error logged. Enabling validation, resulted in an error being thrown; the behaviour we wanted.
    The only thing that's of importance here, is that I
    need to define this functionality within BPEL and not
    ESB, the customer has only acquired bpel for this
    matter because human task integration was necessary.One of the advantages of 11g fortuntely is that separation of concerns will be better. It will be much clearer where to use adapters. Not that this helps in your current case right now :-s
    I should be able to accomplish the xsd validation
    inside a bpel configuration.That should work, good luck!
    Regards, Ronald

  • FTP Adapter XSD Validation

    Hi All,
    Oracle InterConnect 10.1.2
    Oracle Adapters (AQ,FTP) using XSD
    FTP Adapter on local filesystem
    In the FTP Adapter, Is there anyway to validate the XML content against the XSD?
    The validation is happening at the common view when i use the "Validate XML" check box while creating the event in iStudio. However this option does not appear while configuring the FTP adapter in iStudio. I would like FTP adapter to reject the XML file if the XSD validation fails and move the file to the exception folder.
    Objective: XSD should perform datatype, datasize and format validations.
    Thanks,
    Sherry

    Can anyone let me know how to enforce the XSD validation in the adapter. As of now only the structure of the message is being checked.

  • XSD validation in ABAP

    Hi folks.
    Is it possible to validate a message using a XSD (in XI) using ABAP Classes / functions instead of JAVA (and BPM)? Like mandatory fields, field types, etc etc
    Thanks in advance.
    Best regards.
    Valter Oliveira.

    hey valter,
    you can do that in any language you want.
    The point is that you already have delivered java APIs for xsd validation (actually, xsd validation is performed as standard by compliant SAX/DOM parsers).
    For ABAP, you'd probably need to develop this API from scratch.
    The advantage of Java is not its speed or resource-consuming: it is just that everything is already developed on Java. lol
    Regards,
    Henrique.

  • XSD VALIDATION IN ABAP PROGRAM

    Hi,
    I have a requirement where in a report i am picking xml file from the presentation server (desktop) and then i am parsing the xml file using FM "SMUM_XML_PARSE" (first i use FM SCMS_BINARY_TO_XSTRING and then SMUM_XML_PARSE). after using the function SMUM_XML_PARSE i get the xml data in my internal table and then my report uses that data for some processing. This all is working fine .
    My issue is that how do i do a XSD VALIDATION for the xml file that i am reading . I would have liked to do a xsd validation after i import the xml file and throw error if the xml file is not as per its xsd.As i am not using any middleware technology like XI/ WTX which have XSD validation functionality i am not sure how to achieve this in abap program.

    Hi,
    I think you're right, iXML can only validate DTD via its if_ixml_parser->set_validating method (you can find this information in SAP SDN article "ABAP XML Mapping", as of release 6.10, I couldn't find any other reference saying that xsi:noNamespaceSchemaLocation is supported since then).
    By looking at SDN, I saw an external link about XSD to DTD conversion via XSLT (http://crism.maden.org/consulting/pub/xsl/xsd2dtd.xsl), but I don't have any idea if it works. On another thread, people used OS command to do XML/XSD validation, but didn't describe what they ran exactly (anyway, that means using any external tool).
    Sandra

  • Can SOA 11g fault policy handle XSD Validation errors from the Mediator?

    I would like all errors in my SOA process to go through the fault-policies.xml. But I don't seem to be able to catch any mediator error caused by an XSD validation failure. A sample of the sort of error I am trying to 'catch' is:
    Nonrecoverable System Fault          oracle.tip.mediator.infra.exception.MediatorException: ORAMED-01303:[Payload default schema validation error]XSD schema validation fails with error Invalid text 'A' in element: 'TermCode'Possible Fix:Fix payload and resubmit.
    My fault-policies.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicies xmlns="http://schemas.oracle.com/bpel/faultpolicy">
    <faultPolicy version="2.0.1"
         id="NewStudentRegistrationFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:rjm="http://schemas.oracle.com/sca/rejectedmessages" name="rjm:GetNewStudentRegistrationFile">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:TYPE_ALL">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:mediatorException">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:bindingFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    <faultName xmlns:bpelx="http://schemas.oracle.com/bpel/extension" name="bpelx:remoteFault">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    <faultPolicy version="2.0.1"
         id="MediatorFaults"
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <Conditions>
    <faultName xmlns:medns="http://schemas.oracle.com/mediator/faults" name="medns:1303">
    <condition>
    <action ref="java-fault-handler"/>
    </condition>
    </faultName>
    </Conditions>
    <Actions>
    <Action id="java-fault-handler">
    <javaAction className="edu.villanova.soa.handlers.FaultNotificationHandler"
    defaultAction="ora-human-intervention" propertySet="faultNotificationProps">
    <returnValue value="OK" ref="ora-human-intervention"/>
    </javaAction>
    </Action>
    <!-- Human Intervention -->
    <Action id="ora-human-intervention">
    <humanIntervention/>
    </Action>
    <!-- Terminate -->
    <Action id="ora-terminate">
    <abort/>
    </Action>
    </Actions>
    <!-- Property sets used by custom Java actions -->
    <Properties>
    <!-- Property set for FaultNotificationHandler customer java action -->
    <propertySet name="faultNotificationProps">
    <property name="from">[email protected]</property>
    <property name="to">[email protected]</property>
    <property name="subject">Reporting a SOA rejected msg. fault</property>
    </propertySet>
    </Properties>
    </faultPolicy>
    </faultPolicies>
    My fault-bindings.xml file is as follows:
    <?xml version="1.0" encoding="UTF-8" ?>
    <faultPolicyBindings version="2.0.1"
    xmlns="http://schemas.oracle.com/bpel/faultpolicy"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <composite faultPolicy="NewStudentRegistrationFaults"/>
    <component faultPolicy="MediatorFaults">
    <name>NewStudentRegistrationMediator</name>
    </component>
    <service faultPolicy="NewStudentRegistrationFaults">
    <name>GetNewStudentRegistrationFile</name>
    </service>
    </faultPolicyBindings>
    You'll notice that I've tried a number of ways (and various other combinations) to try to steer the error above into my Java fault handler but nothing has meet with success. The mplan is as follows:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!--Generated by Oracle SOA Modeler version 1.0 at [2/3/10 1:21 PM].-->
    <Mediator name="NewStudentRegistationMediator" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/sca/1.0/mediator"
    wsdlTargetNamespace="http://xmlns.oracle.com/pcbpel/adapter/ftp/Experiments/NewStudentRegistration/GetNewStudentRegistrationFile%2F">
    <operation name="Get" deliveryPolicy="AllOrNothing" priority="4"
    validateSchema="true">
    <switch>
    <case executionType="queued" name="RegToBanner.insert_2">
    <action>
    <transform>
    <part name="$out.NewstudentregistrationCollection"
    function="xslt(xsl/NewStudentRegistration_To_NewstudentregistrationCollection.xsl, $in.body)"/>
    </transform>
    <invoke reference="RegToBanner" operation="insert"/>
    </action>
    </case>
    </switch>
    </operation>
    </Mediator>
    I'm a newbie to Oracle SOA. So perhaps I am missing the obvious. But I haven't read much in the documentation specifically about using the XSD validation option on the mediator and have seen nothing specifically about catching this sort of exception in the fault policy (apart from the faults I already have in my policy). Can anyone suggest what I am doing incorrectly here or perhaps whether what I am attempting to do is not possible? Thanks.
    - Cris

    Has anyone got it working yet?
    In my case, I have the following sequence:
    FileAdapter -> Mediator1 -> Mediator2->DB Adapter
    I am deliberately introducing validation error in File. Isn't it correct to assume Fault framework would get triggered at Mediator1 level since we are invoking FileAdapter service?
    I am getting a strange behaviour. If I enable XSD validation at Mediator1 level, process is Faulted with no re-try option. However, if I enable XSD validation ONLY at Mediator2 level, I get Recoverable fault. There seems to be some disconnect between documentation and reality. I am using JDeveloper 11.1.1.3.0 version and SOA Suite 11g.
    Thanks,
    Amjad.

  • Attributes missing after XSD validation!

    I'm feeding a very simple XML file into an equally simple XSD validator. When it returns, all of my tags are fine, but the attributes are dropped. If I parse the file directly, without validation, the attributes are fine.
    I've posted my files online at http://www.pastie.org/507569
    Am I doing something wrong here? Is this a bug in my JRE (1.6.0r14)?
    Thanks for any help,
    Norman

    XML
    <config blah="5">hello!</config>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
         <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd" />
      <xs:element name="config">
       <xs:complexType>
        <xs:simpleContent>
         <xs:extension base="xs:string">
          <xs:attribute name="blah" type="xs:string"/>
         </xs:extension>
        </xs:simpleContent>
       </xs:complexType>
      </xs:element>
    </xs:schema>
    My code...
    SchemaFactory schema_factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schema = schema_factory.newSchema(new File("test.xsd"));
    StreamSource xml_source = new StreamSource(new File("test.xml"));
    StringWriter xml_bridge = new StringWriter();
    StreamResult xml_result = new StreamResult(xml_bridge);
    Validator validator = schema.newValidator();
    validator.validate(xml_source, xml_result);
    System.out.println("Validated to: " + xml_bridge.toString());
    Result...
    Validated to: <?xml version="1.0" encoding="UTF-8"?><config>hello!</config>

  • XSD validation for incoming data into BPEL process

    Please suggest how to validate XSD incoming data into BPEL process.
    I just wanted to verify the data before entering into BPEL

    Hi,
    I guess i am replying very late.
    In BPEL 2.0 we have an activity called "Validate" which can do the XSD validations.
    "Lets Learn Oracle SOA: Validate XML schema In BPEL"
    Regards,
    Chinmaya

  • XSD VALIDATION

    Hi,
    I have generated the DOM TREE and this dom tree need to pass through XSD Validate and then the generated (XML) is to go through the XSLT processor.
    I need your suggestion how to go with after generating the DOM TREE.
    Thanks.

    Nice find, Ben. Thanks.
    I've been using jUnit with the XML and XSD support in Java 5. Here's a link, if anyone is looking for a way to do XSD validation from within a Java program:
    http://itunesu-api-java.googlecode.com/svn/branches/xsd-validation/src/test/edu/ asu/itunesu/XsdTest.java
    Dave

  • XSD validation with multiple namespaces

    Hi All,
    I'm trying to validate some XML using an XSD that contains multiple namespace schema descriptions, as such, the main XSD file must import an XSD for each namespace.
    The difficulty is that I cannot seem to find a way (in Oracle) to run a XSD validation using this (multi-XSD file) method.
    Has anyone out there tackled a similar problem?
    Cheers,
    Ben

    check out the class
    CL_XML_SCHEMA
    Regards
    Raja

  • Xsd validation in Database for 1 million record

    Hello All,
    I would like to know the pros and cons to do the xsd validation of a million record in 11g database and if possible the processing time taken to do xsd validation for million records.
    What would be good datatype to load this xml file of million records, should it be blog/clob or varchar2(200000000).
    Thanks.

    varchar2(200000000).SQL VARCHAR2 is limited to 4000
    PL/SQL VARCHAR2 is limited to 32767

  • Urgent Requirement : XSD Validation for internal references

    Hi,
    I have a requirement , according to which....i have
    Invoice Date and Contract Date and XSD validations on these two fields are dependent.
    i.e, invoice date is required if contract date is absent .
    Contract date is required if invoice date is absent.
    How can we validate the xml file with this scenario using XSD.
    Thanks for the help....in advance.
    Regards,
    Aru

    Hi,
    The solution to the problem u gave works fine but validates like AND condition not OR.........
    Any other answers..........Thanks for ur reply......
    Aru

  • Why XSD Validation Is used and How

    Hi All
    Please explaim why we use XSD validation and how it is done.
    Regar

    Hi Nidhi,
    >>I still did not unserstand that what is the purpose of using XSD vilidation for sender soap scenario.
    May be you shoudl have written this in the first place that you need to know why XSD validation for SOAP sender scenarios
    Now have you created a SOAP scenario in PI and have given the wsdl to some external client? If yes then you may not be required to use the XSD validation option, because you have given the source structure used in PI in the wsdl file itself.
    Now think like you have not provided the wsdl file and  the source side is manually creating the XML that need to be sent to PI. there are chances that the mandatory fields may be missed or some other mismatch in structure can happen. If you don't go for XSD validation in source side there are chances that you message mapping may fail. So to avoid this you can use the XSD Validation, where you are validating the XML structure (which is sent to PI) with XSD schema (which is used in PI) amd if any mismatch found then it can fail before mapping
    Regards
    Suraj

  • Problem with XSD validation in Java 5

    Hi everyone,
    my application creates in memory schema using JDOM. In Java 6 validation runs fine, but in Java 5 (which is the target platform currently) it fails.
    I tried a second test with just parsing an existing XSD document (not created using JDOM) and that works.
    The textual representation of both (file and JDOM generated) are identical. If I replace the XSD file with the JDOM output, the "file test" runs fine, too.
    Here's the test code:
        protected void assertXsdValid(Source xsdSource, InputSource xmlInputSource) throws SAXException, ParserConfigurationException, IOException {
            isValid = true;
            SchemaFactory sf = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
            sf.setErrorHandler(myErrorHandler);
            Schema schema = sf.newSchema(xsdSource); // <<--------- THIS LINE FAILS IN JAVA 5
            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            dbf.setNamespaceAware(true);
            dbf.setSchema(schema);
            DocumentBuilder db = dbf.newDocumentBuilder();
            db.setErrorHandler(myErrorHandler);
            db.parse(xmlInputSource);
            assertTrue(isValid);
        }This is the XSD:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://some.org/metamodel" elementFormDefault="qualified">
      <xs:element name="system">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="name" type="xs:string" />
            <xs:element name="vendor" type="xs:string" />
            <xs:element name="version" type="xs:decimal" />
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>This is the error message I get:
    ERROR: org.xml.sax.SAXParseException: s4s-att-invalid-value: Invalid attribute value for 'type' in element 'element'. Recorded reason: UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared.
    This is how I call the test code in the JDOM test:
            assertXsdValid(new JDOMSource(xsdDoc), new JDOMSource(xmlDoc).getInputSource());If I change the code to parsing not the JDOMSource, but a StreamSource reading the textual representation of the XSD, it works fine!
            assertXsdValid(new StreamSource(new ByteArrayInputStream(new XMLOutputter().outputString(xsdDoc).getBytes())), new JDOMSource(xmlDoc).getInputSource());But this is not what I want (I expect suboptimal performance with large XSD documents). So, if it works with Java 6, then why doesn't it work with Java 5?
    How can I use the Java 6 JAXP in Java 5?
    Thank you.

    A new user name?
    I can think of ways round your problem but can you first provide a reference that indicates that byte 0x80 is the MS936 encoding for the Euro?
    P.S. This is a forum and the vast majority of participants, including me, have no direct relationship with Oracle so getting definitive answers from Oracle via this forum is unlikely. If you think you have found a bug in 1.5 and/or 1.6, and I am not convinced you have, you need to report it via the bug database. If it is a bug then the response time for a fix is likely to be months rather than days.
    P.P.S No I can't explain why it works in 1.7!

  • Xsd validation in java

    hai
    I need help on validating a schema(xsd) file in parsing an xml document
    how can i do it ?
    I would be thankful if you could give any sample code or link .
    Thank you

    hi Jose,
    PI 7.1 has a built in feature available called XML vaidations ..
    your source xml can be validated against a XSD placed at a specific location on the PI server..
    validation can be performed at adapter/integration engine
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83df1?quicklink=index&overridelayout=true

Maybe you are looking for

  • Why is the cd read speed so slow?

    Brand new iMac 27" 2.7GHz 16GB Ram  running 10.7.3.  CD read speeds are very slow...something like 5x.  Importing audio CDs to iTunes is extremely slow.  Error checking is turned OFF.  Any ideas?

  • Mac Mini as a NAS

    Okay, here's the deal. I got a 500g MyBook External Firewire drive, and I wanted to use it as a NAS from my Mac Mini. The idea is to use time machine on my Macbook over the network on the external HD. Is this possible? Because I can't even seem to ge

  • Flaky USB Wireless Connection on Mini

    I've recently installed a Hawking USB Wireless adapter 802.1 B/G to connect to the internet via a 3-Com router located in house with a strong signal. My hubby has been using the same router on a Windows machine with no problems for quite some time. T

  • How to correctly update video chip drivers

    I am currently using Boot Camp with Windows 7 64 Bit on my MBP Early 2011. My question is how can you successfully update the video chip drivers when using windows 7? When I try to install drivers the AMD updater can not recognize my video card. But

  • Clients not receiving addresses from DHCP

    I have a Cisco 2811 router and have configured it to be a DHCP server at a remote site.  It seems like it should be pretty straight forward to configure DHCP.  Apparently I'm missing something because I can't get clients to receive an address.  Below