XML validation against the XSD schema

Hi all

I have a strange problem.

I'm trying to validate an XMLTYPE variable against a XSD schema using the XMLisValid function.

The XML code that I am trying to validate returned false (0) when you use this method.

However, when I save the XSD against a column in a table, and then insert this XMLTYPE in this column, I don't get any errors. If I change the XSD to ensure failure when using this method, I get an error, if it is registered and work.

I then created a very basic XSD and both methods work when validating XML against that. Then of course the XSD harder I want to validate against a difference, but I expect or them both don't both pass, not a failure and a single pass.

Does anyone know why it would return different results?

Thanks in advance for your help.

Robin

examples of what I use:

XML to validate:

<>centers
< Add >
<>Center
< centreName > name 1 < / centreName >
< centreRef > 45678 < / centreRef >
< / Center >
< / add >
< / Center >

Simple XSD:

<? XML version = "1.0" encoding = "UTF-8"? >
< xs: Schema attributeFormDefault = "unqualified" elementFormDefault = "qualified" xmlns: XS = "http://www.w3.org/2001/XMLSchema" >
< xs: element name = "centres" type = "centresType" / >
< name XS: complexType 'addType' = >
< xs: SEQUENCE >
< xs: ELEMENT type = "xs: String" name = "centreName" / >
< xs: ELEMENT type = "xs:short" name = "centreRef" / >
< / xs: SEQUENCE >
< / xs: complexType >
< name XS: complexType = "centresType" >
< xs: SEQUENCE >
< xs: ELEMENT type = "addType" name = 'Add' maxOccurs = "3" minOccurs = "0" / >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: Schema >

XSD complex:

<? XML version = "1.0" encoding = "utf-8"? >
<! - created with liquid XML Studio - 30 Day Trial Edition 7.1.6.1440 (http://www.liquid-technologies.com)->
< xs: Schema attributeFormDefault = "unqualified" elementFormDefault = "qualified" xmlns: XS = "http://www.w3.org/2001/XMLSchema" >
< xs: element name = "Center" >
< xs: complexType >
< xs: SEQUENCE >
< xs: element name = "Remove" >
< xs: complexType >
< xs: SEQUENCE >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "centreRef" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "50" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< xs: element name = "Add" >
< xs: complexType >
< xs: SEQUENCE >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "Center" >
< xs: complexType >
< xs: SEQUENCE >
< xs: element name = "centreName" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "100" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: element name = "centreRef" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "50" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1" name = "qualities" >
< xs: complexType >
< xs: SEQUENCE >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "qualRef" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "100" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< xs: element name = "modifyQualAssociations" >
< xs: complexType >
< xs: SEQUENCE >
< xs: element name = "Remove" >
< xs: complexType >
< xs: SEQUENCE >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = "o" >
< xs: complexType >
< name XS: attribute = use "centreRef" = "required" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "50" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: attribute >
< name XS: attribute = use "qualRef" = "required" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "100" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: attribute >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< xs: element name = "Add" >
< xs: complexType >
< xs: SEQUENCE >
< xs: ELEMENT minOccurs = "0" maxOccurs = "1000" name = 'a' >
< xs: complexType >
< name XS: attribute = use "centreRef" = "required" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "50" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: attribute >
< name XS: attribute = use "qualRef" = "required" >
< xs:simpleType >
< xs:restriction base = "XS: String" >
< xs:minLength value = "1" / >
< xs:maxLength value = "100" / >
< / xs:restriction >
< / xs:simpleType >
< / xs: attribute >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< / xs: SEQUENCE >
< / xs: complexType >
< / xs: element >
< / xs: Schema >

Just had a quick glance at your XSD complex...



You have a piece of 'delete' that is required as part of the sequence of elements with the element "centers." Yet your XML will fail validation compared with what it has only one item "add".

Maybe your


must be:


?

Just guessing. ;)

Tags: Database

Similar Questions

  • Store XML in the schema issue generated tables and XML Validation against the schema.

    Hello friends,

    I am facing a problem where to store xml in a saved schema generated from tables.

    It's my diagram

    --

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xs: schema xmlns:ds = ' http://www.w3.org/2000/09/xmldsig# "" xmlns: XS = " " http://www.w3.org/2001/XMLSchema "xmlns =" " http://www.ABC.inf.in/test "targetNamespace =" " http://www.abc.inf.in/test" elementFormDefault = "qualified" attributeFormDefault = "unqualified" > "

    < xs: include schemaLocation = "abc.xsd" / >

    < xs: element name = "project" type = 'student' >

    < xs: annotation >

    < Intention > it is a Documentation < / intention >

    < / xs: annotation >

    < / xs: element >

    < / xs: Schema >

    -This is my xml document

    "< project versão ="2.00"xmlns ="http://www.abc.inf.in/test">."

    "< test xmlns ="http://www.abc.inf.in/test">."

    " < intest version ="2.00"Id ="testabc"xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "  >

    < ide >

    < cUF > 35 < / cUF >

    < cNF > 59386422 < / cNF >

    < natOp > This is post < / natOp >

    < indPag > 1 < / indPag >

    < mod > 55 < / mod >

    < set > 1 < / series >

    < / ide >...

    .....................

    Giving not complete because it is too long.

    1. I registered successfully of the schemas in the database

    2. then I generate the saved schema table

    2. in my java code I have validated the document XML schema compared and it's valid successfully.

    3 but when I recorded this XML file in the generated table there me gives error

    As:

    INSERT INTO XMLTABLE

    VALUES

    (XMLTYPE (bfilename('MYDIR','testabc.xml'), NLS_CHARSET_ID ('AL32UTF8')))

    Error report:

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    And I have to store this xml in tables of this so what I have to do?

    Thanks for your reply odie_63.

    I got this my solution for the error. My XML document is not well structured based on my registered XML schema.

    Average in My XML Document is an invalid value and which do not match my schema model so it gives this error

    SQL error: ORA-31061: error XDB: XML error event

    ORA-19202: an error has occurred in the processing of XML

    LSX-00333: literal '94032000' is not valid with regard to the model

    For the Solution, we have two ways

    1. I changed this literal value "94032000" in my xml file, then save it.

    2.

    -To delete this schema can

    -We need to change the schema for the particular element model

    like: -.

    -then to store xml in the database, it works...

    Thank you.

  • the output of XML validation against the XML schema for the Oracle

    Hi all
    We have a requirement where we need to extract all the data from the client to the format of OIOXML (standard at the Denmark) and FTP data for data buyers. I need some information about how we can generate an XML in the specified format of user and validate the XML generated using Oracle Pl/Sql. Once a week we FTP almost 1 million documents, is possible to validate all data that we send. Please provide some guidance.

    Oracle version: 9.2.0.8

    Thanks in advance
    Rambeau

    Published by: user584123 on May 30, 2009 08:39

    user584123 wrote:
    Please respond to my query

    I thought I already did.
    You ask in the right forum.

  • Display the error when the xml document is not valid against the schema

    Hello

    I'm using isChemaValid() in a way that, to determine if the xml document is valid against the xml schema.

    This function returns only 0 or 1, and I want to display the error and the line number if the xml is not valid.

    How can I achieve this?

    Thanks in advance,

    Elad

    Use the XMLType schemaValidate() method. It will throw an exception whose message contains the validation error.

    Get a number of 'line' is not sensible as XML is concerned.

  • What to put in the xsd schema for the form of the ADF radio buttons?

    Hello, we create a form generated from the data of a HT ADF auto which is a type defined in a schema .xsd. Which schema component Let's in the .xsd schema correspond to buttons option in the form of the ADF? For example, in our .xsd we just

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xsd: Schema container = ' http://www.w3.org/2001/XMLSchema "xmlns:wf =" " http://www.example.org "

    " targetNamespace = ' http://www.example.org "elementFormDefault ="qualified"> "

    < xsd: complexType name = "FormDataType" >

    < xsd: SEQUENCE >

    < xsd: element name = "FirstName" type = "xsd: String" / >

    < xsd: element name = "Name" type = "xsd: String" / >

    < xsd: element name = "Department" type = "xsd: String" / >

    < / xsd: SEQUENCE >

    < / xsd: complexType >

    < / xsd: Schema >

    What would be the element / type etc be for radio buttons?

    Hi Tali,

    It depends on what you want to do with radio buttons, but it would be better to be a part of string in most cases.

    This could be better handled on the ADF OTN forum, but I'll take a shot at it.  If you have many items to choose from, you can use the string "Department", you already have in your XSD.  When displayed on the form, include various departments with radio buttons next to each other (for example,"manufacturing", "Marketing", "Sales").

    Because this is the BPM forum, I guess your XSD is used as data for a human task which in turn used to create a form of the ADF.  If this is the case, you can use your "Department" in your XSD string element that has already been placed on your form as a text input field.  The reason is the link that you need to update the element of the human task service is automatically created in this way.  Select this field to text, and then in the properties panel, copy the text that is in the 'value' of the field (you stick it in the Value property of the Radio group you will add in the next step).

    There are two ways to get the radio buttons on the form.  You might drag the "Radio group" widget on the form-> click on radio to 'Create a list (select an item)' button-> click the Add icon to add the choices you want to appear on the form (for example,' manufacturing ', 'Marketing', 'Sale').   Once this was added, paste property value text you copied in the previous step into the field of "Value" property of the new Radio group.

    If you select the radio button of the new group source, it should look like this if you wanted two choices for your radio buttons:

    After this has been added, delete the existing text entry field that was created when the form was generated automatically from the human task.

    Hope this helps,

    Dan

  • difference of unique validation against the line by line validation;

    Hao nor!

    What is the difference between a single validation against the validation of the line by line;

    Bkar1 wrote:
    Hao nor!

    What is the difference between a single validation against the validation of the line by line;

    one-time validation-online fast
    line by line commit-online slow

    one-time validation-online transaction follows the principle of ACID
    line-by-line commit => no logical transaction or the ACID principle is injured.

  • Can not validated against the schema

    I have the following XML

    < HTNG_HotelRoomStatusSearchRS

    " xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

    " xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "

    Version = "7,000".

               xmlns=" http://HTNG.org/2014B "

    " xsi: schemaLocation =" http://HTNG.org/2014B ' HTNG_HotelRoomStatusSearchRS.xsd '

    TimeStamp = "" 2015-04 - 29 T 15: 42:25Z ""

    Target = "Test" TargetName = "AUS".

    TransactionIdentifier = "12345" >

    < success > < / success > < errors > < error Type = '0' doc 'None' = > < / error > < / errors >

    < RoomInformationList >

    < TPA_Extensions >

    < TPA_Extension > < DEVICE UNIT_NUM = "pm_unit_num" UNIT_TYPE = "pm_unit_type_desc" HSK_DESC = "CLN".

    ROOM_STATUS = "EMPY" STATUS_CODE = 'HERE', ARRIVAL_DATE = 'NOW' DEPARTURE_DATE = 'THEN' RESV_TYPE = 'RT '.

    "DRI_PROP_ID ="DPI"RESV_NUM ="RN"CREATE_DATE ="CD"MC_PROPERTY_CODE ="MPC"HOTEL_DATE =" HD "SERVICE_CODE = 'SC' > < / UNIT >

    < / TPA_Extension > < / TPA_Extensions > < / RoomInformationList > < / HTNG_HotelRoomStatusSearchRS >

    I'm trying to validate

    <? XML version = "1.0" encoding = "UTF-8"? >

    " < xs: schema xmlns: XS =" http://www.w3.org/2001/XMLSchema "

                       xmlns=" http://HTNG.org/2014B "

    " xmlns: ota = ' http://www.OpenTravel.org/OTA/2003/05 "" "

    " targetNamespace = ' http://HTNG.org/2014B "

    oraxdb:numProps = "6".

    elementFormDefault = "qualified".

    version = "1.000".

    ID = "HTNG2014B".

    ' xmlns:oraxdb = ' http://xmlns.Oracle.com/xdb "" "

    oraxdb:storeVarrayAsTable = 'true '.

    oraxdb:flags = "2105635".

    oraxdb:schemaURL = "HTNG_HotelRoomStatusSearchRS.xsd"

    oraxdb:schemaOwner = "CLY" >

    < xs: include schemaLocation = "HTNG_SimpleTypes.xsd" / >

    < xs: include schemaLocation = "HTNG_CommonTypes.xsd" / >

    " < xs: import namespace = ' http://www.OpenTravel.org/OTA/2003/05 "schemaLocation ="OTA_CommonTypes.xsd"/ > "

    < xs: annotation >

    < intention XML: lang = "fr" > This message is in response to a HTNG_HotelRoomStatusSearchRQ message. < / intention >

    < / xs: annotation >

    < xs: element name = "HTNG_HotelRoomStatusSearchRS" oraxdb:propNumber = '7324' oraxdb: global = "true" oraxdb:SQLName = "HTNG_HotelRoomStatusSearchRS" oraxdb:SQLType = "HTNG_HotelRoomStatusSea2173_T" oraxdb:SQLSchema = "CLY" oraxdb:memType "258" = >

    < complexType oraxdb:SQLType = "HTNG_HotelRoomStatusSea2173_T" oraxdb:SQLSchema = "CLY" >

    < xs:complexContent >

    < xs:extension base = "HTNG_ResponseBaseType" >

    < xs: SEQUENCE >

    < xs: element name = "RoomInformationList" oraxdb:propNumber = '7323' oraxdb: global = "false" oraxdb:SQLName = "RoomInformationList" oraxdb:SQLType = "RoomInformationList2174_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

    < xs: annotation >

    < intention XML: lang = "fr" > the result set generated by the query sent to the application. < / intention >

    < / xs: annotation >

    < complexType oraxdb:SQLType = "RoomInformationList2174_T" oraxdb:SQLSchema = "CLY" >

    < xs: SEQUENCE >

    < xs: element name = "Rooms" minOccurs = "0" maxOccurs = "unbounded" oraxdb:propNumber = '7322' oraxdb: global = 'false' oraxdb:SQLName = 'Rooms' oraxdb:SQLType = "RoomInformation2175_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" oraxdb:SQLCollType = "RoomInformation2176_COLL" oraxdb:SQLCollSchema = "CLY" >

    < xs: annotation >

    < intention XML: lang = "fr" > a container element used to hold room and reservation information. < / intention >

    < / xs: annotation >

    < complexType oraxdb:SQLType = "RoomInformation2175_T" oraxdb:SQLSchema = "CLY" >

    < xs: SEQUENCE >

    < xs: element name = "Room" type = "HTNG_RoomElementType" oraxdb:propNumber = '7319' oraxdb: global = "false" oraxdb:SQLName = "Room" oraxdb:SQLType = "HTNG_RoomElementType2044_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

    < xs: annotation >

    < intention XML: lang = "fr" > used to pass on information about a room or suite room components compound. < / intention >

    < / xs: annotation >

    < / xs: element >

    < xs: element name = "HotelReservations" type = "ota:HotelReservationsType" minOccurs = "0" oraxdb:propNumber = "7320" oraxdb: global = "false" oraxdb:SQLName = "HotelReservations" oraxdb:SQLType = "HotelReservationsType1709_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

    < xs: annotation >

    < intention XML: lang = "fr" > used to pass on information about the booking and/or its supporting comments. < / intention >

    < / xs: annotation >

    < / xs: element >

    < xs: element name = "TPA_Extensions" type = "ota:TPA_ExtensionsType" minOccurs = "0" oraxdb:propNumber = '7321' oraxdb: global = "false" oraxdb:SQLName = "TPA_Extensions" oraxdb:SQLType = "TPA_ExtensionsType174_T" oraxdb:SQLSchema = "CLY" oraxdb:memType = "258" oraxdb:MemInline = "false" oraxdb:SQLInline = "true" oraxdb:JavaInline = "false" >

    < xs: annotation >

    < intention XML: lang = "fr" > This is used to Exchange custom/setting values in work - specific as are agreed between the trading partners. < / intention >

    < / xs: annotation > < / xs: element > < / xs: SEQUENCE > < / xs: complexType > < / xs: element > < / xs: SEQUENCE > < / xs: complexType > < / xs: element > < / xs: SEQUENCE >

    < / xs:extension > < / xs:complexContent > < / xs: complexType > < / xs: element > < / xs: Schema >

    I'm creating the document. I can't it's the basic scheme.

    DECLARE

    CURSOR c_info

    IS

    (SELECT XMLELEMENT

    'HTNG_HotelRoomStatusSearchRS '.

    xmlattributes)

                           ' http://www.OpenTravel.org/OTA/2003/05 "AS"xmlns:ota" "

                          ,' http://www.w3.org/2001/XMLSchema-instance ' AS ' xmlns: xsi "

    , "7,000"AS "Version".

                          ,' http://HTNG.org/2014B ' AS 'xmlns'

                          ,' http://HTNG.org/2014B HTNG_HotelRoomStatusSearchRS.xsd' AS "xsi: schemaLocation"

    , TO_CHAR (SYSDATE, "DD-MM-YYYY")

    || ' T '

    || TO_CHAR (SYSDATE, 'HH24:MI:SS')

    || 'Z' AS 'TimeStamp '.

    CASE WHEN gn.global_name = 'ATLAS' AND 'Production' ELSE 'Test' END as 'Target'

    , 'AUS' AS 'TargetName '.

    "12345" AS "TransactionIdentifier")

    XMLELEMENT ("Success")

    , XMLELEMENT ("Errors", XMLELEMENT ("Error", xmlattributes ('Type', 'None' AS 'Doc' of "0")))

    XMLELEMENT ("RoomInformationList",

    XMLELEMENT ("TPA_Extensions",

    XMLELEMENT ("TPA_Extension",

    XMLELEMENT ("UNIT"

    xmlattributes ('pm_unit_num' AS 'UNIT_NUM'

    , 'pm_unit_type_desc' AS 'UNIT_TYPE.

    , "CLN" AS "HSK_DESC".

    , "EMPY" AS "ROOM_STATUS".

    , 'HERE' AS 'STATUS_CODE '.

    , "NOW" AS "ARRIVAL_DATE".

    AND 'THEN' AS 'DEPARTURE_DATE '.

    , 'RT' AS 'RESV_TYPE '.

    , "DPI" AS "DRI_PROP_ID".

    , 'RN' AS 'RESV_NUM '.

    , 'CD' AS 'CREATE_DATE.

    , "MPC" AS "MC_PROPERTY_CODE".

    , 'HD' AS 'HOTEL_DATE '.

    'SC' AS 'SERVICE_CODE')))

    AS 'RESULT '.

    FROM global_name gn;

    Tinfo TYPE IS TABLE OF c_info % ROWTYPE;

    t_guests tinfo.

    CLOB xmlDoc;

    l_xmltype XMLTYPE.

    v_schema_to_validate VARCHAR2 (2000);

    non_registered_schema EXCEPTION;

    PRAGMA EXCEPTION_INIT (non_registered_schema,-31000);

    BEGIN

    OPEN c_info.

    Get the c_info COLLECT in BULK IN t_guests;

    CLOSE C_info;

    xmlDoc: = t_guests (1).result.getstringval ();

    l_xmltype: = xmltype (doc);

    -IF l_xmltype.isschemabased () = 0 THEN RAISE non_registered_schema;  END IF;

    -v_schema_to_validate: = l_xmltype.getrootelement () | '.xsd ';

    dbms_output.put_line (v_schema_to_validate);

    dbms_output.put_line (xmldoc);

    END;

    As has been pointed out by Marco, Errors, item is imported the schema HTNG_CommonTypes.xsd.

    It is based on ErrorsType of OTA_CommonTypes.xsd, whose target namespace is http://www.opentravel.org/OTA/2003/05.

    This is why the Error element (declared in ErrorsType complexType) must be qualified by the prefix of the ota in the documents.

  • Create an xml file using the .xsd file

    Hi guys,.

    Version of DB: Oracle 11g

    I was wondering if I had any package that can create a xml file based on a (built-in) .xsd file. I searched but did not find any resource on the internet specific to my problem. Let's say I have an .xsd file. It is possible to load a schema and generate the XML that conform to the .xsd file using sql? If so, I want to store in a CLOB variable.

    Please point me to the right direction.

    Thank you.

    Hello

    No, there is no such functionality yet.

    To build the XML "manually", according to the XSD, for example using SQL/XML functions (XMLElement, XMLAttributes, and XMLAgg etc.).

  • Share the XSD schemas of the BPEL projects?

    Hello

    Does anyone know how to share among projects BPEL XSD schemas?

    I use the GS1 XML standard for a project. But I want to just keep only one consolidated copy of the XML schema. Now, I have to copy the entire schema to each BPEL project folder for use.

    Moreover, I can assign the directory of the application of the scheme to help "... /.. '. "/ something", but I can't assign the absolute path in WSDL. And how about you during the deployment?

    Thank you and best regards,
    Kerr

    Edited by: Kerrs 03/24/2009 15:29

    You can copy xsd in /bpel/system/xmllib folder and access it by using the following url:
    http://:/orabpel/xmllib.

    for example - http://localhost:8888/orabpel/xmllib/Mail.xsd

    Kind regards
    Diakité
    http://SOA-HOWTO.blogspot.com

  • Validation against the dynamic Action

    Hi all

    I have a Submit button which is dynamic in Action, when we click on this button, that pl/sql code is executed.

    Also, I wrote a validation on text box saying that it can not be null. But when I press Submit button dynamic action only to run but not Validation.

    Here is the page, it includes two regions, first region button does not have a dynamic Action, so it is prompting validation error, where, as the second region button is not. Help, please

    https://Apex.Oracle.com/pls/Apex/f?p=9055:2:3349793619276:

    Workspace: KUMAR82

    User: Kumar62

    Pass: Kumar #1

    Thank you

    Kumar.

    Hi Kumar62,

    Kumar62 wrote:

    I have a Submit button which is dynamic in Action, when we click on this button, that pl/sql code is executed.

    Also, I wrote a validation on text box saying that it can not be null. But when I press Submit button dynamic action only to run but not Validation.

    Here is the page, it includes two regions, first region button does not have a dynamic Action, so it is prompting validation error, where, as the second region button is not. Help, please

    Check your 9055 Application-> Page 2. Your problem is solved for the button 'submit for approval '.

    Here are the changes made on page 2:

    • Added real action in your dynamic action to send the page with the query 'SUBMIT' with the following settings:

    Action: Send the Page

    Application/button name: SUBMIT

    See the process facility: No.

    Note: Postings are only performed after the page. The release of DA button was running just your logic, but in order to process the postings you submit page.

    • Changed condition for validations:

    Condition of removed the "when Button Pressed" and game

    Condition type: request = Expression 1

    Expression 1: SUBMIT

    Kind regards

    Kiran

  • Validation against the 2d vs 3d

    We have some geometries in srid 4326 that were converted into 3d using the sdo_cs.make_3d function. A height of 0 and a dry of 4326 received as parameters. Geometries 2d validated when validate_geometry_with_context is called. Geometry 3d validation fail when validate_geometry_with_context is called. Example is below. Has anyone seen this behavior?

    Create the table export_table

    (

    bestgeometry sdo_geometry

    );

    Insert into EXPORT_TABLE (BESTGEOMETRY)

    values

    (

    MDSYS. SDO_GEOMETRY (3003,4326, NULL, MDSYS. SDO_ELEM_INFO_ARRAY (1,1003,1), MDSYS. SDO_ORDINATE_ARRAY(-21.5916061401367,76.6099700927734,0,-21.4999885559082,76.5628890991211,0,-21.1517276763916,76.5508041381836,0,-21.1400337219238,76.6254196166992,0,-21.2099494934082,76.5995559692383,0,-21.2483730316162,76.6333084106445,0,-21.4101276397705,76.6446075439453,0,-21.5916061401367,76.6099700927734,0))

    );

    Select sdo_geom.validate_geometry_with_context(BESTGEOMETRY,0.05) validation3d, sdo_geom.validate_geometry_with_context (sdo_cs.make_2d (bestgeometry),.05) validation2d

    of export_table

    I see.  Then set the flag10g true and it will not show them as faulty.

    Bryan

  • LSX-00204 error when validating an XML file on a registered scheme

    Hello

    When I want to validate an XML file against the registered scheme I get the following error:

    ORA-31154: Ungultiges XML-Dokument ORA-19202: Fehler bei XML-Verarbeitung LSX-00204: additional data am Ende von komplexem aufgetreten element

    Here is the schema snippet:

    <! - the address of a given party in fixed or free form possibly the two forms - >

    < xsd: complexType name = 'Subscription_type' xdb:SQLType = "ITX_FTC_ADDRESS_TYPE_O" xdb:maintainDOM = "false" >

    < xsd: annotation >

    < xsd: documentation XML: lang = "fr" >

    The user has the possibility to enter the data concerning the address of a party, either in a single long field or to distribute data on items up to eight or even to use both formats. If the user chooses the option to enter the necessary data in separate elements, the container for this item will be "AddressFix". If the user chooses the option to enter the necessary data in a way less structured in "AddressFree" all the available coordinates must be submitted as a string of bytes, empty or ' / ' (slash) or trolley line break return used as a delimiter between the parts of the address. PLEASE NOTE that the country code address is outside these two elements. The use of the fixed form is recommended as a general rule, to allow an easy match. However, the use of the free form is recommended if the sending State can surely identify and distinguish the different parts of the address. The user wants to use both formats for example if in addition which separates the logical part of the address he also wants to show a decent breakdown in print-lines of delimiters in the form of free text. In this case, "AddressFix" must precede the 'AddressFree '.

    < / xsd: documentation >

    < / xsd: annotation >

    < xsd: SEQUENCE >

    < xsd: element name = "PostalCode" type = "iso: CountryCode_Type ' xdb:SQLName = 'COUNTRY_CODE' / >

    < xsd: Choice >

    < xsd: element name = "AddressFree" type = "xsd: String" xdb:SQLName = "ADDRESS_FREE" / >

    < xsd: SEQUENCE >

    < xsd: element name = "AddressFix" type = "sfa:AddressFix_Type" xdb:SQLName = "ADDRESS_FIX" / >

    < xsd: element name = "AddressFree" type = "xsd: String" minOccurs = "0" xdb:SQLName = "ADDRESS_FREE" / >

    < / xsd: SEQUENCE >

    < / xsd: Choice >

    < / xsd: SEQUENCE >

    < xsd: attribute name = "legalAddressType" type = "stf:OECDLegalAddressType_EnumType" use = "optional" / >

    < / xsd: complexType >

    The problem occurs only when the second choice (when: "AddressFix" and "AddressFree") was given in the XML file. When only the first choice ("AddressFree") gave then the validation against schema very well recorded works.

    I think that the problem is based on the generation of all objects in the database of dbms_xmlschema.registerSchema.

    BTW, how is possible to get a more meaningful error message because the error I get is very common, and I can't imagine in which the problem occurs.

    Thanks in advance.

    Best regards

    Martin

    I have reproduced the issue on 11.2.0.4 using the Schémas XML FATCA.

    declare
    
      l_schemas  sys.odcivarchar2list :=
                sys.odcivarchar2list('isofatcatypes_v1.0.xsd',
                                     'oecdtypes_v4.1.xsd',
                                     'stffatcatypes_v1.1.xsd',
                                     'FatcaXML_v1.1.xsd');
    begin
    
      for i in 1 .. l_schemas.count loop
    
        dbms_xmlschema.registerSchema(
          schemaURL       => l_schemas(i)
        , schemaDoc       => xmltype(bfilename('FATCA_DIR', l_schemas(i)), nls_charset_id('AL32UTF8'))
        , genTypes        => true
        , genTables       => false
        , enableHierarchy => dbms_xmlschema.ENABLE_HIERARCHY_NONE
        );
    
      end loop;
    
    end;
    /
    

    As in schema extract that you provided, I've annotated subscription_type complexType with xdb:maintainDOM = "false".

    Then tried to validate the example NilFIReport.xml file after adding an AddressFix element:

    JP

    String

    String

    SQL> declare
      2    doc  xmltype := xmltype(bfilename('FATCA_DIR', 'NilFIReport.xml'), nls_charset_id('AL32UTF8'));
      3  begin
      4    doc.schemaValidate();
      5  end;
      6  /
    declare
    *
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00204: extra data at end of complex element
    ORA-06512: at "SYS.XMLTYPE", line 354
    ORA-06512: at line 4
    

    Now, let's abandon patterns, remove the xdb:maintainDOM annotation (or set to true, the default) and re - register:

    SQL> declare
      2    doc  xmltype := xmltype(bfilename('FATCA_DIR', 'NilFIReport.xml'), nls_charset_id('AL32UTF8'));
      3  begin
      4    doc.schemaValidate();
      5  end;
      6  /
    
    PL/SQL procedure successfully completed.
    

    Works.

    Conclusion: set maintainDOM to false when using XS: Choice.

    There is probably a mess when the positional descriptor (attribute "$SYS_XDBPD") is missing in this case.

  • show all the resources for an XSD schema

    I am running Oracle 10.2.0.4 and today they asked me if it is possible to display all the XML documents (resources) that are validated against an XSD, registered.

    The XML DB repository contains several registered XSD schemas and XML files have the annotation "noNamespaceSchemaLocation". I would like to know if it is possible to list all XML files that contains the noNamespaceSchemaLocation for a particular XSD schema annotation.

    Kind regards
    René

    The easiest way is to join the RESOURCE_VIEW with the default table

    SQL> select any_path from resource_view,purchaseorder p where extractValue(res,'/Resource/XMLRef') = ref(p)
      2  and rownum < 10;
    
    ANY_PATH
    --------------------------------------------------------------------------------
    /home/OE/PurchaseOrders/2002/Aug/CJOHNSON-20021009123337283PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/DAUSTIN-20021009123337103PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/JCHEN-20021009123337123PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/JCHEN-20021009123337223PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/LSMITH-20021009123337323PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/SBELL-20021009123337353PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/SKING-20021009123337153PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/SMCCAIN-20021009123337173PDT.xml
    /home/OE/PurchaseOrders/2002/Aug/TFOX-20021009123337243PDT.xml
    
    9 rows selected.
    
  • Strict XML Validation configuration in BPEL process

    Hello

    If we have 10 processes BPEL and using all the adapter file that can be read or write XML files against the schema.

    We have a BPEL configuration which console

    validateXML - validate inbound and outbound xml documents: "strict or None" Stict mean schema and nothing means no validation, but this seams to be level configuration above process, means if I put Strict, it will apply to all the processes BPEL 10, I can't choose who need validation and process has no need of validation.

    Work around suite SOA.

    Kind regards
    Abdou

    Abdou,

    Each partner link contains the validateXML property, you can use this property to control where you want to validate XML load and where not.

    To add this property, double click the partner link, go to the property tab and click on the button of the property. Select validateXML from the drop-down list, and then provide his value(strict/none).

    Kind regards
    Diakité
    http://SOA-HOWTO.blogspot.com

  • Linking a sequence of XSD schema to subform repeated items

    Hi, I have created a form with the rows in the table that is repeated using an Add button to add rows dynamically. I lie the line with the schema xsd with a [*] at the end of the option of data binding with ticked repeat rows for each data item. All by submitting the form as XML data to java controller I get only one line of the table and not other lines dynamically added by add the functionality of the button.

    Untitled.jpgUntitled1.jpg

    Untitled2.png

    I want to know that how generate the XML for lines added dynamically linked with an XSD schema.

    I also explored the link below, but is not to solve the problems:

    http://www.Adobe.com/devnet/LiveCycle/articles/binding-XSD.html

    Thanks in advance

    I have solved the problems by adding maxOccurs = "unbounded" in the xsd schema with the name of the bound element.

Maybe you are looking for