Check XML file against XSD? Via XSLT?

Hello,
we´re using a 6.20 system (XI not available) and want to check XML files against a XML-schema definition file (xsd).
Is there a function in 6.20 available for this? Is it possible to use "CALL TRANSFORMATION" for it? I´ve seen other XSLT parser in the internet which are able to check a source XML against an XSD before transforming it to the result XML.
But is this possible with an 6.20 system?
Thank you for your help,
best regards,
Stefan

Here is the sample XML and the schema.
XML:
<?xml version="1.0" encoding="UTF-8"?>
<book isbn="0836217462">
<title>
  Being a Dog Is a Full-Time Job
</title>
<author>Charles M. Schulz</author>
<character>
  <name>Snoopy</name>
  <friend-of>Peppermint Patty</friend-of>
  <since>1950-10-04</since>
  <qualification>
    extroverted beagle
  </qualification>
</character>
<character>
  <name>Peppermint Patty</name>
  <since>1966-08-22</since>
  <qualification>bold, brash and tomboyish</qualification>
</character>
</book>
XSD:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="book">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="title" type="xs:string"/>
        <xs:element name="author" type="xs:string"/>
        <xs:element name="character" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="friend-of" type="xs:string" minOccurs="0"
                      maxOccurs="unbounded"/>
              <xs:element name="since" type="xs:date"/>
              <xs:element name="qualification" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="isbn" type="xs:string"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
- Suman

Similar Messages

  • Validate a XML file against multiple schema files

    Hello everybody!
    How can I validate a XML file against multiple schema files?
    I have the following XML file:
    <?xml version="1.0" encoding="UTF-8"?>
    <bulkCmConfigDataFile xmlns:es="SpecificAttributes.3.0.xsd"
                             xmlns:xn="genericNrm.xsd"
    xmlns="configData.xsd">
    <fileHeader fileFormatVersion="32.615 V4.2" vendorName=""/>
    <configData dnPrefix="Undefined">
    <xn:SubNetwork id="3G">
    <xn:SubNetwork id="RNC01">
    <xn:MeContext id="RNC01">
    <xn:VsDataContainer id="RNC01">
    <xn:attributes>
    <xn:vsDataType>vsDataMeContext</xn:vsDataType>
    <xn:vsDataFormatVersion>SpecificAttributes.3.0</xn:vsDataFormatVersion>
    <es:vsDataMeContext>
    <es:userLabel>RNC01</es:userLabel>
    <es:ipAddress>172.21.3.17</es:ipAddress>
    <es:neMIMversion>vF.5.0</es:neMIMversion>
    </es:vsDataMeContext>
                                  </xn:attributes>
    </xn:VsDataContainer>
    </xn:MeContext>
    </xn:SubNetwork>
    </xn:SubNetwork>
    </configData>
    <fileFooter dateTime="2006-11-24T11:56:07Z"/>
    </bulkCmConfigDataFile>
    I want to load this file into a table, validate it (against SpecificAttributes.3.0.xsd, genericNrm.xsd and configData.xsd) and query that table. How would the INSERT .. and the SELECT ... for userLabel attribute look like?
    Many thanks!

    Hi Peter,
    Please use the validateXML BPEL Property : This property validates incoming and outgoing XML documents. If set to true, the Oracle BPEL Process Manager applies schema validation for incoming and outgoing XML documents. This property is applicable to both durable and transient processes. The default value is false.
    Cheers
    A

  • Binding Xml file with Xsd Schema

    Hello
    everybody there.
    I am trying to make an application where word files are converted into xml.
    For that i have used org.exolab.castor and org.apache.poi.hwpf.
    Now the problem is that i was able to generate the xml file from word, but when i am binding it with XMLSchema.xsd following error is coming.
    java.lang.IllegalArgumentException: getSimpleType: the simple type 'formChoice' is not a built-in type as defined in XML Schema specification.
         at org.exolab.castor.xml.schema.Schema.getSimpleType(Schema.java:1289)
         at org.exolab.castor.xml.schema.Schema.addSimpleType(Schema.java:583)
         at org.exolab.castor.xml.schema.reader.SchemaUnmarshaller.endElement(SchemaUnmarshaller.java:643)
         at org.exolab.castor.xml.schema.reader.Sax2ComponentReader.endElement(Sax2ComponentReader.java:198)
         at org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1392)
         at org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator.java:1550)
         at org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1149)
         at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
         at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:430)
         at org.exolab.castor.builder.SourceGenerator.generateSource(SourceGenerator.java:485)
         at TempHwpf.<init>(TempHwpf.java:35)
         at TempHwpf.main(TempHwpf.java:44)the code for binding my xml file with xsd schema is as under:-
    SourceGenerator sourcegen = new SourceGenerator();
    sourcegen.getVersion();
    System.out.println(sourcegen.getVersion());
    sourcegen.generateSource("XMLSchema.xsd","packagename");I have checked XMLSchema.xsd file, in that formChoice is already defined, than also error is coming.
    can anyone help me out. first i thought that XMLSchema.xsd which i have is not proper, but i downloaded it again from w3c.org,
    than also same error is shown.
    please help me out.
    waiting for reply.
    milind

    Please do not double-post. http://forum.java.sun.com/thread.jspa?threadID=5134447&tstart=0
    Then use Stax (Woodstock) or Saxon.
    - Saish

  • Create an XML file from XSD file in JDeveloper

    Hi,
    I am working on XML DTD and XSD to validate xml file using JDeveloper.
    1. How we can create xml file from XSD in JDeveloper.
    2. How to design content model very easily..
    3. where can I learn XSD easily.. any URL
    can anyone help out..
    with regards
    Abu Sufian

    The XML node in the new gallery has an option to create XML document from schema
    See this demo:
    http://www.oracle.com/technology/products/jdev/viewlets/1013/xml_viewlet_swf.html
    There are several places on the Web that teaches XSD
    for example: http://www.w3schools.com/schema/

  • How to use Xerces to validate an XML file against a DTD

    Hi, can anybody tell me how to use Xerces to validate an XML file against a DTD. its urgent. post some sample code. it would be helpful for my project. isupposed to use SAX parser(Xerces)
    Thanx in advance

    Come on, I googled "xerces validate" and the first link is the Xerces FAQ:
    http://xerces.apache.org/xerces-j/faq-general.html
    And of course "how to validate" is a Xerces FAQ. Help yourself by doing a little research instead of waiting for other people.

  • How to convert XMl file to XSD file

    how to convert XMl file to XSD file ?
    i have a xml file format  it has to be converted to xsd file through ABAP .
    Regards
    Anbu B

    i got the answer....
    Regards
    Anbu B

  • How to validate xml file with XSD schema ??  in JDK1.4.2

    How to validate xml file with XSD schema ?? in JDK1.4.2
    i dont want to use new Xerec Jar ...
    Suggest option ...

    Please do not double-post. http://forum.java.sun.com/thread.jspa?threadID=5134447&tstart=0
    Then use Stax (Woodstock) or Saxon.
    - Saish

  • XML validation against XSD

    Hi,
    Does Oracle 8i (Release 3) support XML validations against XSD? I know Oracle 9i (Release 2) supports XML validations against XSD.
    Also, Does Oracle support XML validations against XDR?
    Any info is appreciated.
    Thanks
    Pavan

    Validate with DOMParser or the SAXParser.

  • Best way to validate and xml file against a schema?

    As the subject states, I want to validate my xml file against a given schema....
    Currently my code looks like this:
    InputSource ipSource = new InputSource(new ByteArrayInputStream(bytesData)); // my xml file
    DOMParser parser = new DOMParser();
    parser.parse(ipSource);
    Document doc = parser.getDocument();
    I see that there is a setFeature method on DomParser.... but from what I read that doesnt support
    xml schema's, just DTD's. So what is the best way to validate with schema's?
    Any help would be appreciated

    This is the other way I tried doing it.... the problem with this way is I am building my xml file through DOM
    operations... and I haven't figured out how to add the schema line to the xml file through DOM manipulations.
    Has anyone done this bofore?
    try
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(false);
         factory.setValidating(true);
         InputSource ipSource = new InputSource(new ByteArrayInputStream(bytesData));
         DocumentBuilder builder = factory.newDocumentBuilder();
         doc      = builder.parse(ipSource);
         return doc;
    catch(Throwable t)
         System.out.println("parse error: " +t);
    return doc;
    }

  • URGENT---Validating XML file against DTD

    I have a XML & DTD file.I want to validate that xml file against the specified DTD without using any editor.Through program how can i validate?Pl. help me.It's URGENT.

    >
    and i recieved ORA-31001: Invalid resource handle or path name "/testdtd.dtd"
    when the DBMS_XMLPARSER.parseClob( PARSER , v_xml ); is executed
    i removed the <!DOCTYPE family SYSTEM "testdtd.dtd"> from the XML file
    the procedures worked , but not sure if really validated against the DTD file>
    you have to load your DTD into XDB repository.
    <a href ="http://forums.oracle.com/forums/thread.jspa?threadID=416366">How do I use DTD's with XML DB ?
    Ants

  • XML Publisher (Converting (.xml )XML file into (.xsd)XMLSchema)

    Hi,
    How to convert (.xml) XML file into (.xsd.) XML Schema.
    Please help me out.
    Thanks,
    SubbaRao.

    Hi,
    Actually We have to generate reports using XML Publisher.For this we gone through the documents provided by XML Publisher.As per Pusher documents we followed the steps.
    Taken the Oracle Apps Report.Converted into .xml file then converted into XML Schema (.xsd) by using Stylus studio.
    Now we are not able to create .rtf file.
    please help us.
    Thanks,
    Venkat.

  • How to validate an XML file with XSD Schema on JDK 1.4

    Hi
    I'm looking for samples how to validate xml files with xsd schema using jsdk 1.4
    Thank you.

    This is how.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
    dbfac.setNamespaceAware(true);
    SchemaFactory factory1 = SchemaFactory
                        .newInstance("http://www.w3.org/2001/XMLSchema");
    Schema schema = factory1.newSchema(new File("person.xsd"));
    dbfac.setSchema(schema);
    DocumentBuilder dbparser1 = dbfac.newDocumentBuilder();
    Document doc1 = dbparser1.parse(new File("person.xml"));
    Validator validator1 = schema.newValidator();
    DOMSource dm1 = new DOMSource(doc1);
    DOMResult domresult1 = new DOMResult();
    validator1.validate(dm1, domresult1);

  • Conversion of xml file to xsd

    Hi SapAll.
    i have got a requirement in an IDOC To xml File Interface where i need to create a structure for the target xml file .
    here i have sample xml file ,so i just want to know if there is any other way to generate xsd from the xml file instead of creating strucure in PI.i mean is there any website to do this ?.
    if i can get the xsd from the sample xml file then i can just import that xsd directly into External Definition for the target xml file structure

    Hi
    but when i imported the the updated xsd into External definition it raises the error as below
    Unable to convert imported document to WSDL
    You might have done any syntax error,make sure you insert the required field properly in the exported XSD.
    If you have visual studio 2005 , in your PC then you can open the XSD using that and edit in a proper format.
    Its good if you have XML SPY , you can check the syntax correctness and validate the XSD before importing.
    check the syntax required by referring tohttp://www.w3schools.com/Schema/schema_simple_attributes.asp
    And also make sure while importing  you choose "xsd" instead of  wsdl which is the default option for importing
    external definition.
    Regards,
    Srinivas

  • To generate a XML file against schema

    Hello,
    I am trying to parse a schema then against the schema to create new DOM object for the new XML file. After going through each element type from the schema DOM and find the type of each element, I could not deal with <xsd:sequence>. I could parse the schema without <xsd:sequence> well, but I am stuck with "sequence".
    Any idea will be highly appreciated.
    The following is the fragement of the code:
    public string findType(Node el){
                String type="simple";
                if (el.getChildNodes().getLength()>0){
                    for (int j=1;j<el.getChildNodes().getLength();j=j++) {
            //out.println("The element" + el.getChildNodes().item(j).getNodeName());
              if (el.getChildNodes().item(j).getNodeName()=="xsd:complexType") {
               type = " complex ";
          else
                 type = " simple ";
           return type;
        }Thank you.
    Vica

    what does your code have to do with your problem. Does the code you have posted work? I don't see any reference to xsd:schema.

  • XML validation against XSD Schema in ABAP

    Hi colleagues,
    I'm looking for a way to validate a XML against a XSD schema in ABAP, without using java or command line or something like that. Is there any way to do this only with ABAP?
    Thanks in advance.
    Regards,
    Guenter

    Hi everyone,
    I'm currently facing the same problem. I need to validate a xml file with an existing xsd schema for some export/import functionality. I just found an ABAP program doing this with a Java fallback. But isn't there a way doing this wihtout using Java but only ABAP? There certainly is, anyone an idea?
    Thank you and regards
    Maximilian

Maybe you are looking for

  • Css layout issue with IE

    Hi Folks, I've tried two different things in my stylesheet and each produces an odd error that I'm not sure what the deal is. I'm working with a wraper, leftnav and content area. when I do this #leftWrap width: 190px; float: left; clear: both; #conte

  • Best Adobe Captivate Screen Size for all Devices?

    Which would you say is the best screen size to use to cater for all device types (pc, laptop, tablet, mobile, etc.)? Thanks.

  • Oracle on Solaris - General UNIX Question

    Anyone have a way to list out the hidden (dotfiles) only on a Solaris box? ls -a shows both hidden and normal files I just want to list the hidden files and directories. Thanks

  • Problem with Acrobat type library 10 with VB6 on Win7 64bit

    I'm trying to use the Acrobat type library 10 in a visual basic 6 source code on my Windows 7 64bit. On the web I found many examples, and specifically i'm trying this one:         'IAC objects         Dim gAvDoc As Object         Dim oPagesSrc As Lo

  • Sorting data in the form

    Is there any other way to sort data in the form other than the order by block property? I have a form built off of a view. The view returns data quickly up until I add the order by clause. his happens in sqlplus as well as in the form.