Validating against XML Schema

Hi,
does someone know how to validate a XML file against
a XSD File (XML Schema) in ABAP. Iam using the IXML Package.
Thanks.
Jim

I've originally been using Xerces1_4_0, but you're right - it's xerces-2_0_0_beta4 that does the job.
Thanks for the hint!
Luca

Similar Messages

  • Vivado 2013.4 ERROR: [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order

    Hello,
    I just downloaded and installed Vivado 2013.4 on my Xubuntu 12.04 machine. But when I try to add IP from the IP catalog, as in the ug937 Lab1 step2, it fails with obscure error messages (see below).
    Here's basically what I did:
    -In the Flow Navigator, i select the IP Catalog button.
    -In the search field of the IP Catalog, I type DDS.
    -then I double-click the DDS Compiler and my error occure.
    Please Help,
    Jerome.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen_demo.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen_demo.vhd":1]
    Analysis Results[IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen.vhd":1]
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    set_property target_language Verilog [current_project]
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    sources_1[IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen_demo.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen_demo.vhd":1]
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    update_compile_order -fileset sim_1
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/fsm.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/fsm.vhd":1]
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/fsm.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/fsm.vhd":1]
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [HDL 9-1654] Analyzing Verilog file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sim/testbench.v" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sim/testbench.v":1]
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/debounce.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/debounce.vhd":1]
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-2313] Loaded Vivado IP repository '/opt/Xilinx/Vivado/2013.4/data/ip'.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-1704] No user IP repositories specified
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    Vivado Commands[Project 1-11] Changing the constrs_type of fileset 'constrs_1' to 'XDC'.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    sim_1[IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [HDL 9-1654] Analyzing Verilog file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sim/testbench.v" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sim/testbench.v":1]
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-234] Refreshing IP repositories
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-395] Problem validating against XML schema: Invalid value format for this type spirit:order
    [IP_Flow 19-193] Failed to save BOM file '/home/jmassol/.Xil/Vivado-2683-ubuntu/coregen/dds_compiler_0/dds_compiler_0.xml'.
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/debounce.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/debounce.vhd":1]
    [IP_Flow 19-3378] Failed to create IP instance 'dds_compiler_0'. Error saving IP file.
    [IP_Flow 19-194] Failed to save IP instance 'dds_compiler_0'.
    [HDL 9-1061] Parsing VHDL file "/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen.vhd" into library work ["/home/jmassol/Desktop/Vivado/vivado_debug/ug937/project_xsim/project_xsim.srcs/sources_1/imports/ug937/sources/sinegen.vhd":1]
    set_property constrs_type XDC [current_fileset -constrset]
     

    We had the same problem when switching to Ubuntu 14.04, and there actually is a solution for it: make sure your locales are set to English.
    $> env | grep LC_*
    should only show english (or C) locales, all others are known to cause parsing errors in some numbers, usually caused by wrong string-to-float conversions (e.g. 18,29 in german is 18.29 in english). You can change the locales in the file /etc/default/localesThis is not the first time we had problems with the locale settings, Xilinx does not seem to test their software with anything else than en_US, causing obscure bugs like this one.
    HTH
    Philipp

  • XML instance validation against XML schema

    How can I get a reference on the error node object after
    validation against an XML schema ?
    Ex. :
    DOMParser domP = new DOMParser();
    domP.setXMLSchema(schemaDoc); // schemaDoc = ref. on an XMLSchema
    domP.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    domP.parse(reader); // reader contains the XML instance data
    If an error occurred, I only get a message string. What I need is to get a reference on the node object which contains the error in order to retrieve its properties to the schema.
    I could then alert the user with a message such as :
    "Data xxx is not valid ; it must be comprised between yy and zz...".
    Did somebody solve this problem ? May I use the XMLError class to do this ?
    Thank you

    Hi Ray,
    Were you able to resolve this issue? I am encountering a very similar problem where I am not connected to the internet and it fails during the newSchema method on javax.xml.validation.SchemaFactory. I have attempted to implement the suggestions of ExtremeGardener and vidyut with no luck.
    Per ExtremeGardener's suggestion of replacing xmlns:xs="http://www.w3.org/2001/XMLSchema" with xmlns:xs="XMLSchema.xsd" and storing it locally, it gave me an error for trying to set the "xs" or "xsd" prefixes to anything other than "http://www.w3.org/2001/XMLSchema." I forget the exact error. I also tried to use my own prefix and it did not like that either.
    Per vidyut's suggestion of using a catalog resolver, I believe that I have tried that too (if I understand correctly). I created an LSResourceResolver and tied it to the SchemaFactory. I can invoke it for a namespace but that did not resolve the issue because it only invokes the resolver on an import, include, or redefine. I believe that it is trying to reach the internet due to the xmlns:xs="http://www.w3.org/2001/XMLSchema" attribute within the top-level schema element in the XSD and I know of no way to invoke it for that.
    I also created an ErrorHandler and tied it to the SchemaFactory. That shows me the errors and they are all related to the standard XML data types defined in XMLSchema.xsd. The errors that I am seeing are all of this form: "UndeclaredPrefix: Cannot resolve 'xs:string' as a QName: the prefix 'xs' is not declared."
    I am currently using the SchemaFactory in Java 1.5, but I am thinking about trying the Xerces SchemaFactory since they are not exactly the same implementation.
    Does anyone have any other suggestions? Any help you can provide would be greatly appreciated!
    Thanks,
    betzro1

  • QUESTION: XML validation against a schema - for beginners

    Hi folks,
    i am new to XML validation.
    i would like to find out how to validate an XML file using a schema given to me by a third part company.
    the business process requires that our company sends a weekly file which complies with their schema.
    in real-life, i am expecting some details of our file to fail against their schema.
    thus i would like to find a way validating the file localy before sending it to this third part.
    this validation would ideally allow me to highlight and identify which records are failing the validation, and enable me to strip those and send only those that are successfully checked.
    on the example below, i would expect to have the record for John Smith to be successful (country has an integer); while Queen Victoria would fail as it uses UK instead of an integer to identify the country.
    thus i would need to find a way validating this XML file, move the record of Queen Victoria to another file to be fixed and to allow, the record for John Smith to be sent out.
    if you guys could post some links to where i can find further information on this type of processing, i would be most grateful.
    Many thanks,
    Nicolas
    using an example from:
    [http://www.codeguru.com/csharp/csharp/cs_data/xml/article.php/c6737]
    XSD
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="address">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="name" type="xs:string"/>
    <xs:element name="street" type="xs:string"/>
    <xs:element name="city"type="xs:string"/>
    *<xs:element name="country"type="xs:integer"/>*
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>XML
    <address>
    <name>John Smith</name>
    <street>109 Abbey Close</street>
    <city>Hayes</city>
    <country>98</country>
    </address>
    <address>
    <name>Queen Victoria</name>
    <street>1 Regent Street</street>
    <city>London</city>
    <country>UK</country>
    </address>Edited by: www.jegue.net on Jan 13, 2009 9:48 AM
    Edited by: www.jegue.net on Jan 13, 2009 9:49 AM

    i would need to find a way validating this XML file, move the record of Queen Victoria to another file to be fixed and to allow, the record for John Smith to be sent out.I don't think any automated tool or API available with such features. You should achieve this by some tricky logic/code.

  • Re: Validation Against A Schema With DOM

    I tried to redeploy a properly working application using Schema not DTD. It worked perfectly before but after redeployment, I got this an error complaining of missing "AbstractDOMParser". I downloaded this jar "xercesImpl.jar" which contain "AbstractDOMParser" . The error is gone away. However, a new error popped up as following. Remember, I don't encounter any problem like this before redeployment.
    Recoverable Error: Document is invalid: no grammar found. ( Check line number:2, column:7)
    Recoverable Error: Document root element "rules", must match DOCTYPE root "null". ( Check line number:2, column:7)
    My guess is that I downloaded the wrong Parser. I need a parser for Schema not DTD. Where can I download the parser for Schema (not DTD parser)? any other potential factors, which you all can think of ,caused this error? Any input I really appreciate.
    Here is my XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <rules xsi:noNamespaceSchemaLocation="/SUNWappserver7/domains/domain1/applications/j2ee-modules/olbr_1/WEB-INF/classes/schemas/ezgov_bre.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <rules-package name="Navigation">
    <rule-script name="GetNextNavigationId">
    # initialize values
    navId = ""
    if (NavigationControllerDataSetName_navigationControllerCurrentNavigationId != N
    one):
    navId = NavigationControllerDataSetName_navigationControllerCurrentNavigatio
    nId.lower()
    newNavId = ""
    if (NavigationControllerDataSetName_navigationControllerNavigationId != None):
    newNavId = NavigationControllerDataSetName_navigationControllerNavigationId.
    lower()
    action = ""
    Thanks in advance,
    Van

    Set the parser as a schema validating parser.
    parser.setFeature("http://xml.org/sax/features/validation",
                      true);Set the validation/schema feature to true to report validation errors against a schema.
    parser.setFeature("http://apache.org/xml/features/validation/schema",
                      true);Set the validation/schema-full-checking feature to true to enable full schema, grammar-constraint checking.
    parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking",
                      true);

  • Validation of XML-Schema

    I have a question, if in the XDK there is a
    possibility to check a .xsd file, if it belongs to the XML Schema Definition http://www.w3.org/2000/10/XMLSchema
    Thanks for your help
    Greetings, Merry Christmas and Happy new Year
    Andreas

    Simply use the self-same XML Schema Processor to validate your *.xsd schema against the schema for XML Schema itself. That is, the XML Schema spec "ships" with a normative XML Schema which describes the valid elements that a schema author can use to write a schema. If you have a particular XML schema definition in hand, it is in particular an instance of a document that should be valid by the XML schema for XML Schema, if you've done it correctly.

  • Can't validate against XML Schema take 2

    Hi,
    A few weeks ago I posted a message asking how an XML Schema file should be deployed
    in a web application. During 15 days I recived a lot of replies to questions I
    didn't ask but none to the question I asked. I recall that the XML Schema file
    is deployed with the web application in WEB-INF. I tried also WEB-INF/classes
    and WEB_INF/lib. The XML SChema file is not found. So I'm asking again: how is
    one supposed to deploy an XML Schema file in a Web application ?
    Kind regards,
    Nicolas DUMINIL

    Hi :-)
    Yes it does, in the DomHandler.java it serializes to XML then does the
    reparse with validation.
    BTW, I realized that I left out of the zip the xsd file. It is
    attached. Note also the bar.xml is using this schema from
    http://localhost
    You also have another alternative: employ a parser-specific extension to
    do the revalidation. Xerces' extension appears to be early support for
    nonfinal DOM Level 3, which supports this as part of "normalizing" a DOM
    tree. See http://xml.apache.org/xerces2-j/faq-dom.html#faq-7.
    Good luck in your continuing efforts,
    Bruce
    Nicolas DUMINIL wrote:
    >
    Bruce,
    The example you attached doesn't do any schema validation, as you seem thinking.
    In order to do schema validation, one needs at least a schema, as an XSD file.
    Or the example you provided doesn't contain any schema, at least I didn't see
    any, maybe I'm blind. The example you provided is only doing parsing and, consequently,
    it doesn't have anything to do with the problem I posted. Thank you for your time
    but honestly, don't feel obligated to just reply anything if you don't have the
    answer or you don't understand the problem.
    Kind regards,
    Nicolas DUMINIL
    Bruce Stephens <[email protected]> wrote:
    Hello,
    To obtain information from our outstanding support team you need to open
    a communication dialog using the support portal or email. The
    newsgroups are informally maintained by volunteers (typically
    development engineers), are not maintained by customer support, and
    provide no guarantee for response time or problem resolution.
    Attached is a simple web service example that does schema validation.
    See if this works OK in your environment.
    Hope this is of some value,
    Bruce
    Nicolas DUMINIL wrote:
    I went on http://support.bea.com but there is no any usefull information.
    I took
    a look in the examples you suggested and I found out that it simplydoesn't have
    anything to do with the problem I mentioned. My problem is validatingXML documents
    against an XML Schema. As I repeted at least 10 times:
    1. I know how to parse XML documents.
    2. I know how to use DTDs in validating XML documents.
    3. I also have all the information concerning the XML Schema validationand I
    know how to configure the parser for that.
    The problem I have is that my XML Schema deployed with the applicationis not
    found. It i not on the CLASSPATH, it is deployed with the applicationas any application
    component.
    Kr,
    Nicolas DUMINIL
    Bruce Stephens <[email protected]> wrote:
    Hello,
    Since this has been an ongoing issue, the best solution at this point
    may be to open a dialog with our outstanding support group:
    http://support.bea.com or [email protected]
    BTW, you also may want to take a quick look at the example provided:
    http://dev2dev.bea.com/codelibrary/code/examples_xml.jsp
    Hope this is of some value,
    Bruce
    Nicolas DUMINIL wrote:
    Hi,
    A few weeks ago I posted a message asking how an XML Schema file
    should
    be deployed
    in a web application. During 15 days I recived a lot of replies
    to
    questions I
    didn't ask but none to the question I asked. I recall that the XMLSchema file
    is deployed with the web application in WEB-INF. I tried also WEB-INF/classes
    and WEB_INF/lib. The XML SChema file is not found. So I'm asking
    again:
    how is
    one supposed to deploy an XML Schema file in a Web application ?
    Kind regards,
    Nicolas DUMINIL
    [simple.xsd]

  • Unable to validate against XML schema-URGENT!!!!

    Hi,
    I'm new to JAXP. I've been trying to validate an XML document against a Schema. But the error I get is as following:
    java Schema org.xml.sax.SAXNotRecognizedException:
    Property: http://java.sun.com/xml/jaxp/properties/schemaLanguage
    at org.apache.crimson.parser.XMLReaderImpl.setProperty(XMLReaderImpl.java:272)
    at org.apache.crimson.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:190) at Schema.main(Schema.java:20)
    I understand that this problem is because my system is using the old default Crimson parser.
    could some one please help me out with installing and using the latest Xerces parser.
    1. I have jdk 1.4.2
    2. I have JWSDP 1.4( can the jar files there help or do I have to download the jar's from apache?)
    3. please let me know the full trouble shooting process including where should I place the jar files or how should I set the classpath.
    4. would this affect validating against a DTD(which works fine now)
    thanks in advance.
    cheers
    R43

    JAXP SAXParser produces the error
    java Schema org.xml.sax.SAXNotRecognizedException:
    Property: http://java.sun.com/xml/jaxp/properties/schemaLanguage

  • Xml validation with xml schema

    Hi
    I want to do the validation of a xml file against the XML schema.How can i do that.
    As per jaxp we can do the validation of an xml file against DTD ,CAN we do the validation against XMLschema in a same way.
    Please help its urgent.
    regards
    prateek

    if you're using the Xerces parser, you def. can.
    if u look at the SAXCount example, you'll see a certain amount of attributes are set to true/false.
    one of these is Schema validation. set it to true, run the SAXCount.java example, and your XML is validated against it's XML Schema,

  • Error of Validation of XML Schema in BEA WorkSpace Studio

    When I validate my XML Schemas throught the BEA WorkSpace Studio Version: 1.1 Build id: 1090602 the follow error happens:
    Referenced file contains errors (file:/MyPath/MyXMLSchema1.xsd).
    For more information, right click on the message and select "Show Details..."
    Show Details:
    The errors below were detected when validating the file "MyXMLSchema1.xsd" via the file "MyXMLSchema2.xsd".
    In most cases these errors can be detected by validating "MyXMLSchema1.xsd" directly.
    However it is possible that errors will only occur when MyXMLSchema1.xsd is validated in the context of MyXMLSchema2.xsd.
    src-resolve: Cannot resolve the name 'srv:Services' to a(n) 'type definition' component
    When I validate my XML Schemas throught the oepe_11gR1PS4 (Eclipse Platform Version: 3.6.2 Build id: M20110210-1200) no errors were found.
    My project is an OSB Project (ALSB Project).
    What's happen?

    BEA WorkSpace Studio Version: 1.1 Build id: 1090602 use xerces bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651
    oepe_11gR1PS4 (Eclipse Platform Version: 3.6.2 Build id: M20110210-1200) use xerces Oracle\Middleware_10.3.5\oepe_11gR1PS4\plugins\org.apache.xerces_2.9.0.v201005080400.jar
    If you replace the follow files:
    bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\resolver.jar
    bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\xercesImpl.jar
    bea\alsb3.0\tools\eclipse_pkgs\1.1\eclipse_3.2.2\eclipse\plugins\org.apache.xerces_2.8.0.v200606131651\xml-apis.jar
    for:
    Oracle\Middleware_10.3.5\oepe_11gR1PS4\plugins\org.apache.xerces_2.9.0.v201005080400.jar
    BEA WorkSpace Studio Version: 1.1 Build id: 1090602 will validate without errors (the same oepe_11gR1PS4 behaviour)

  • Error in xml file validating to xml schema

    Hey,
    I am getting the following error while validating xml file to its schema:
    The error is:
    SAMPLEITEMDLFILE.xml:2,139: no declaration found for element 'WMWROOT'
    The XML document SAMPLEITEMDLFILE.xml is NOT valid (1 errors)
    schema file:
    <?xml version="1.0" encoding="utf-8" ?>
    <xs:schema id="ItemDownload" targetNamespace="http://www.manh.com/ILSNET/Interface" elementFormDefault="qualified"
         xmlns="http://www.manh.com/ILSNET/Interface" xmlns:xs="http://www.w3.org/2001/XMLSchema" version ="2007">
         <xs:include schemaLocation="Item.xsd" />
    <xs:element name="WMWROOT" nillable="true" type="WMWROOT" />
    <xs:complexType name="WMWROOT">
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1" name="WMWDATA" type="WMWDATA" />
    </xs:sequence>
    </xs:complexType>
    <xs:element name="WMWDATA" nillable="true" type="WMWDATA"/>
    <xs:complexType name="WMWDATA">
    <xs:sequence>
    <xs:element minOccurs="0" maxOccurs="1" name="Items" type="ItemList" />
    </xs:sequence>
    </xs:complexType>
    <xs:element name="Items" nillable="false" type="ItemList" />
    <xs:complexType name="ItemList">
    <xs:sequence>
    <xs:element minOccurs="1" maxOccurs="unbounded" name="Item" nillable="true" type="Item" />
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    This is the part of PL/SQL code thru which I am generating the xml:
    UTL_FILE.put_line (l_out_file, '<?xml version="1.0" ?>');
    UTL_FILE.put_line (l_out_file, '<WMWROOT');
    UTL_FILE.put_line (l_out_file, 'xmlns="http://www.manh.com/ILSNET/Interface"> ');
    UTL_FILE.put_line (l_out_file, '<WMWDATA>');
    UTL_FILE.put_line (l_out_file, '<Items>');
    I am validating it in stylus studio tool.
    Can any1 tell me where I am goin wrong?

    Hi,
    I am using databse version 10.2.0.03. I am getting the output of xml file like tis:
    <?xml version="1.0" ?>
    <WMWROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.manh.com/ILSNET/Interface ItemDownload.xsd">
    WMWDATA>
    <Items>
    <Item>
    <action>Save</action><UserDef8>10074</UserDef8><active>Y</active><availableonweb>N</availableonweb><cost>285.93</cost><desc>HP DESKJET PRINTER (EMBLA)</desc><HarmCode><Identifier>9019.20.0000</Identifier></HarmCode><Item>R145-794</Item><InventoryTracking>Y</InventoryTracking><LongDesc>HP DESKJET PRINTER (EMBLA)</LongDesc><LotControlled>Y</LotControlled><SerialNumTrackInbound>Y</SerialNumTrackInbound><SerialNumTrackInventory>Y</SerialNumTrackInventory><SerialNumTrackOutbound>Y</SerialNumTrackOutbound><StorageTemplate><Template>Each</Template></StorageTemplate><XRefs><XRef></XRef></XRefs>
    </Item>
    </Items>
    </WMWDATA>
    </WMWROOT>
    My plsql code is like tis:
    SELECT /*rule*/
    XMLELEMENT (
    "Item",
    XMLFOREST (action AS "action",
    Userdef8 AS "UserDef8",
    active AS "active",
    availableonweb AS "availableonweb",
    cost AS "cost",
    description AS "desc"),
    XMLELEMENT ("HarmCode",
    XMLFOREST (Identifier AS "Identifier")),
    XMLFOREST (
    Item AS "Item",
    inventorytracking AS "InventoryTracking",
    Longdesc AS "LongDesc",
    lotcontrolled AS "LotControlled",
    serialnumtrackinbound AS "SerialNumTrackInbound",
    serialnumtrackinventory AS "SerialNumTrackInventory",
    serialnumtrackoutbound AS "SerialNumTrackOutbound"),
    XMLELEMENT ("StorageTemplate",
    XMLFOREST (Template AS "Template")),
    XMLELEMENT (
    "XRefs",
    XMLELEMENT ("XRef", XMLFOREST (XRefItem AS "XRefitem")))).
    getclobval ()
    ----------------------------------------writing to utl file-------------
    l_out_file :=
    UTL_FILE.fopen (lv_path,
    -- lv_out_file,
    'testingitemsdl.xml',
    'W',
    32767);
    UTL_FILE.put_line (l_out_file, '<?xml version="1.0" ?>');
    UTL_FILE.put_line (l_out_file, '<WMWROOT');
    UTL_FILE.put_line (l_out_file, 'xmlns="http://www.manh.com/ILSNET/Interface"> ');
    UTL_FILE.put_line (l_out_file, '<WMWDATA>');
    UTL_FILE.put_line (l_out_file, '<Items>');
    FOR i IN lc_item_info
    LOOP
    UTL_FILE.put_line (l_out_file, i.item);
    END LOOP;
    UTL_FILE.put_line (l_out_file, '</Items>');
    UTL_FILE.put_line (l_out_file, '</WMWDATA>');
    UTL_FILE.put_line (l_out_file, '</WMWROOT>');
    UTL_FILE.fclose (l_out_file);

  • Validating a xml schema (xsd file)

    Hi,
    I was wondering - my program should accept schema files and before doing whatever it does with them I want to put them through a validation and present errors if any.
    I wasn't sure what is the right way to go about this - I know how to set up a validating parser with my own ErrorHandler and retrieve error info for simple xml files and xml schema instances, but how do I set up the parser to validate a schema definition?
    My first idea was to validate it like I would validate any schema instance, since xsd files also have their own schema definition, but that seems kind of funny, since obviously the parser already knows what a schema definition should look like.
    Has anyone done this?
    Thanks,
    Uri.

    Try something like this??
    DocumentBuilderFactory DBF = null;
    try
    DBF = DocumentBuilderFactory.newInstance();
    catch (Exception fce)
    // Set various configuration options
    DBF.setValidating(true);
    DBF.setNamespaceAware(true);
    DBF.setIgnoringComments(true);
    DBF.setIgnoringElementContentWhitespace(true);
    DBF.setCoalescing(true);
    DBF.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaSource", new File(Filename));
    DBF = DBF.newDocumentBuilder();
    DBF.setErrorHandler(this);
    DBF.setEntityResolver(this);
    catch (Exception pce)
    blah blah blah blah....
    I hope this is what you were looking/asking for... I could be way off base here 8-))

  • Validate XML against Xml Schema using JDBC (thin_driver)

    hi all,
    i have a table with a xmltype-column (XmlSchema Support) and i wonna load(and validate) xml-data( as String) in the xmltype-column.
    some thing like this :
    int count=1;
    String SQLTEXT=null;
    Statement stmt=null;
    ResultSet rs =null;
    //while(count<=1000)
    try
    stmt = connection.createStatement();
    rs = stmt.executeQuery("select SEQ_patxmlschema_ID.NEXTVAL from patxmlschema");
    if(rs.next())
    id =rs.getLong(1);
    System.out.println(id);
    stmt.close();
    stmt=null;
    rs.close();
    SQLTEXT = "INSERT INTO patxmlschema(id, patID, name, status, patInfo)"+
              "VALUES(?,?,?,?,XMLType(?))";
    pStmt = connection.prepareStatement(SQLTEXT);
    long patID = random.nextInt(30000);
    System.out.println("patId: "+ patID);
    String name = RandomStringUtils.random(6,true,false);
    System.out.println("lastname: "+ name);
    String firstname=RandomStringUtils.random(5,true,false);
    System.out.println("firstname: "+ firstname);
    String status=RandomStringUtils.random(8,true,false);
    System.out.println("status: "+ status);
    String street=RandomStringUtils.random(6,true,false);
    System.out.println("street: "+ street);
    String zip=RandomStringUtils.random(5,false,true);
    System.out.println("zip: "+ zip);
    String city=RandomStringUtils.random(6,true,false);
    System.out.println("city: "+ city);
    String phone=RandomStringUtils.random(8,false,true);
    String email=RandomStringUtils.random(15,true,false);
    String state=RandomStringUtils.random(6,true,false);
    String country=RandomStringUtils.random(6,true,false);
    System.out.println("country: "+ country);
    xmldoc=
         "<Patient>"+                    "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'"+          "xsi:noNamespaceSchemaLocation='http://olidong.net/patInfo.xsd'>"+
         "<Address>"+                         "<street>"+street+"</street>"+                         "<city>"+city+"</city>"+                    "<zip>"+zip+"</zip>"+
         "<state>"+state+"</state>"+                    "<country>"+country+"</country>"+
         "</Address>"+               "<phone>"+phone+"</phone>"+                    "<email>"+email+"</email>"+
         "</Patient>";
         pStmt.setLong(1, id);
         pStmt.setLong(2, patID);
         pStmt.setString(3, name);
         pStmt.setString(4, status);
         pStmt.setString(5, xmldoc);
         pStmt.executeUpdate();
    pStmt.close();
         pStmt=null;
         count++;
         //connection=null;
    catch(Exception e){
    e.printStackTrace();
    can you help me?
    Olidong

    hi Avi,
    my xml doc is valid. with the sqlplus the are no problem or error. tryng the same with jddbc(thin driver) i got this error.
    i don´t know, may be jdbc don´t support xml schema support insertion.
    i got this sample:
    DECLARE
    doc VARCHAR2(2000) :=
    '<schema
    targetNamespace="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns:po="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified">
    <complexType name="PurchaseOrderType">
    <sequence>
    <element name="PONum" type="decimal"/>
    <element name="Company">
    <simpleType>
    <restriction base="string">
    <maxLength value="100"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Item" maxOccurs="1000">
    <complexType>
    <sequence>
    <element name="Part">
    <simpleType>
    <restriction base="string">
    <maxLength value="20"/>
    </restriction>
    </simpleType>
    </element>
    <element name="Price" type="float"/>
    </sequence>
    </complexType>
    </element>
    </sequence>
    </complexType>
    <element name="PurchaseOrder" type="po:PurchaseOrderType"/>
    </schema>';
    BEGIN
    DBMS_XMLSCHEMA.registerSchema(
    'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd', doc);
    END;
    CREATE TABLE mypurchaseorders OF XMLType
    XMLSchema "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    ELEMENT "PurchaseOrder"
    VARRAY xmldata."Item" STORE AS TABLE item_nested;
    INSERT INTO mypurchaseorders
    VALUES(
    XMLType(
    '<PurchaseOrder
    xmlns="http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation
    = "http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd
    http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd">
    <PONum>1001</PONum>
    <Company>IBM</Company>
    <Item>
    <Part>DB2 v9 Set</Part>
    <Price>2550</Price>
    </Item>
    <Item>
    <Part>8i Doc Set</Part>
    <Price>350</Price>
    </Item>
    </PurchaseOrder>'));
    with the sqlplus the are no error
    but insert with java jdbc:
    SQLTEXT = "INSERT INTO mypurchaseorders VALUES(XMLType(?))";
    String xmldoc= "<PurchaseOrder"+
    "xmlns='http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'" +
    "xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" +
    "xsi:schemaLocation= 'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'"+
    "'http://xmlns.oracle.com/xdb/documentation/purchaseOrder.xsd'>"+
    "<PONum>1001</PONum>"+
    "<Company>IBM</Company>"+
    "<Item> "+
    "<Part>DB2 v9 Set</Part>"+
    "<Price>2550</Price>"+
    "</Item>"+
    "<Item>"+
    "<Part>8i Doc Set</Part>"+
    "<Price>350</Price>"+
    "</Item>"+
    "</PurchaseOrder>";
    pStmt.setString(1, xmldoc);
    i got this error
    java.sql.SQLException: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00240: element-start tag is not well formed
    Error at line 1
    ORA-06512: at "SYS.XMLTYPE", line 301
    ORA-06512: at line 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:213)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:952)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
         at xml_tab.doInsert(xml_tab.java:118)
         at xml_tab.main(xml_tab.java:138)
    could you help me?
    Olidong

  • Oracle XML Parser validation against XML Sxhema

    Hi,
    I am developing a program in C++ on Unix, that does parsing on an XML document. For parsing I am using "Oracle XML Parser" [using DOM API]. My question is, Can Oracle XML Parser validate xml document against an XML Schema file also? I have read in many tutorials that it can validate against DTD. Please clarify my question as early as possible?
    Regards,
    Raghuram.

    Hi Kulkarni,
    I think you are trying to retrieve the text of the parent element of book. For example if this is the xml element
    <bookdetails>
    <book>Harry Potter</book>
    <author>JK Rowling</author>
    <price>34.55</price>
    </book>
    </bookdetails>
    You must be trying to retrieving the text of bookdetails.
    Check XMLNode.getNodeName() to retrieve the name of the node.
    To get 'Harry Potter' as output you need to traverse till book and then use XMLNode.getText()
    You can check the 'getQuestions()' method in Survey Sample
    to know how to tranverse to any element of an XML using Java.
    The Survey Sample is located at
    http://otn.oracle.com/sample_code/tech/xml/survey/content.html
    Download the sample and unjar it. The location of Analyser.java is
    SurveySample\code\Survey\src\oracle\otnsamples\survey\business\Analyser.java
    Have a look at it.
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • Validating with XML Schemas

    Has anyone been successful at validating xml with a Schema running weblogic 6.1
    sp2?
    Here is a snippet of code...
    SAXParserFactory objFactory = SAXParserFactory.newInstance();
    objFactory.setValidating("true");
    objFactory.setNamespaceAware("true");
    objFactory.setFeature("http://apache.org/xml/features/validation/schema", "true");
    objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)), A_HANDLER);
    When my xml code runs through the parser I get an error for each element saying
    the element type is not declared in the dtd or schema.
    Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml validation
    with a Schema. From what I've read it seems that it does.
    Any help or insight would be appreciated.
    Thanks
    Karen

    I figured out my problem in case anyone else is having trouble..
    In the xml document that you need to refer to:
    xmlns:xsd="http://www.w3.org/2000/10/XMLSchema-instance that is the namespace
    supported by xerces 1.3.1.
    Whew!
    "Karen Schaper" <[email protected]> wrote:
    >
    Has anyone been successful at validating xml with a Schema running weblogic
    6.1
    sp2?
    Here is a snippet of code...
    SAXParserFactory objFactory = SAXParserFactory.newInstance();
    objFactory.setValidating("true");
    objFactory.setNamespaceAware("true");
    objFactory.setFeature("http://apache.org/xml/features/validation/schema",
    "true");
    objXMLInputParser.parse(new InputSource(new StringReader(XMLDocument)),
    A_HANDLER);
    When my xml code runs through the parser I get an error for each element
    saying
    the element type is not declared in the dtd or schema.
    Since weblogic 6.1 runs with 1.3.1 Xerces parser. Does it support xml
    validation
    with a Schema. From what I've read it seems that it does.
    Any help or insight would be appreciated.
    Thanks
    Karen

Maybe you are looking for

  • Windows Vista Boot Camp always running

    I just recently purchased a macbook air ( 1.86, 128gb ssd) and I've been extremely happy with it. I was wondering if people have noticed that the fan is always running when using Vista but not in OS X? Is there a solution?

  • Clicking on a file name in the Save As dialog removes the extension (.html or .jpg)

    In previous versions of (any) browser I could save a web page, and if there were more than one page, as in a thread in a forum, I used to be able to click on the saved file, "file 01.html" in the Save as dialog, it would show up as "file 01.html" and

  • BW Datasource on an Infoset Query based on 2 DSO Active tables

    Hello, We have created a Datasource in the BW system over an Infoset query (through SQ02) built on 2 DSO tables. In RSA3, this datasource is working fine - it shows us some data (close to 1000 records). The issue is when i try and run a infopackage f

  • My Skype number shows up different than what I pur...

    my friends can call me with the number i purchased but when I call them its a different number????

  • Comma Sep. checkboxes

    Insert form with the comma sep. checkboxes works great... Update form with the comma sep. checkboxes does not display or retain inserted values. please advise on know how to code the boxes to display previously checked, as no checkboxes are available