Xml Validation & XQuery Update

Hello,
I have a question on xml validation in Berkeley DB XML (2.5.16).
I read in documentation that an xml can be validated against an xml DTD or Schema when is loaded into a container. However, when an XQuery Update is to be executed is there any configuration that allows checking if the XQuery Update leads to an xml that does not conform with the DTD/Schema? If so, how this case is managed? The XQuery is executed, or not? Is there any exception thrown?
I made a test over this: I wrote an xml (and a related DTD) where an element contains an id attribute and another element a referencing attribute to the aforementioned id. Then, an XQuery Update 'delete' expression deletes the element with the id attribute. The element is indeed deleted, the xml is left in an inconsistent state and I am allowed of making more update operations to this document...
I was wondering if there is any way of handling this case, except from being careful with what updates you choose, so that the xml is kept in a valid state. Is there something I am missing?
thank you in advance,
theo

Hello,
I believe that XQuery execution does not support DTD yet. I'll investigate further and let you know what else I can find.
Thanks,
Sandra

Similar Messages

  • XML DML XQuery Update syntax

    Hi everybody,
    Certainly my question will appear strange and even stupid , but I want to be sure to use the best syntax and also to be confirmed about some points.
    In the document Oracle XML DB Best practices, we can find a lot of statements for modifying XML documents. In page 11 and 12 we have statements with and without XQuery syntax. What is exactly the best way ? Using insertchildxml, updatexml or the update statement with the XMLQuery clause ?
    Why we use copy in these statement, but the keyword copy is not used in a XQuery expression.
    I think copy is not specific to Oracle, is it used in XQuery language ?
    In page 15, the SQL statement to modify XML document uses deletexml, not a XQuery update syntax.
    I'm using Oracle 11G.
    Thanks in advance for your explanations

    user4423142 wrote:
    In the document Oracle XML DB Best practices, we can find a lot of statements for modifying XML documents. In page 11 and 12 we have statements with and without XQuery syntax. What is exactly the best way ? Using insertchildxml, updatexml or the update statement with the XMLQuery clause ?The recommended way is closely tied to the version you're using, which you didn't give.
    "11g" is not a version, it's a product name.
    You can find the version by running :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE     11.2.0.3.0     Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    XQuery Update on Oracle in available in the latest version only : 11.2.0.3.
    If you're using this version, Oracle recommends you start using XQuery Update.
    Why we use copy in these statement, but the keyword copy is not used in a XQuery expression.
    I think copy is not specific to Oracle, is it used in XQuery language ?<tt>copy</tt> is specific to the XQuery Update Facility (XQUF) extension of the XQuery 1.0 language.
    The XQUF was primarily intended to work with native XML databases where it's OK to directly invoke update primitives (insert, delete, replace etc.) to modify database content.
    On Oracle, it's not possible and the current implementation only supports XQUF through the "transform" operation (copy/modify syntax) where a copy of the original document/fragment is modified and written back to the db.
    However, XQuery rewrite and related optimizations may occur so that piecewise updates actually take place.

  • XQuery update

    Hello,
    I seems that the CVS version of XQuilla implements a large part of the XQuery Update working draft, which is great !
    Does it mean that it's usable with BDB XML as-is to get database updates ?
    Thanks,
    Fabrice

    Hi Fabrice,
    I'm afraid there is significant work to do in DB XML before XQuery Update can be used from it. However, It is our intention to support XQuery Update in some future version.
    John

  • Use of XQuery Update Facility

    Dear all,
    I am looking for some database systems that use the W3C XQuery Update facility specification to modify their data.
    To the best of my knowledge, no of well-known commercial database systems uses XQuery Update primitives.
    For instance, Oracle 11g defines some SQL/XML update functions (combined with some XQuery expressions) to modify XML data stored within the database through the XMLType data type.
    IBM DB2 9 uses SQL update statement to modify the whole XML document stored as an XML column and no update is proposed to modify parts of the document.
    Are there some database systems providing XQuery-Update-Facility-based update of their data.
    Thank you in advance.
    Best regards.

    Were you aware of
    [url http://www.liberidu.com/blog/2011/09/22/oracle-xmldb-xquery-update-in-database-release-11-2-0-3-0/]Oracle XMLDB XQuery Update in Database Release 11.2.0.3.0
    Given it is new, expect a few bugs, such as
    {thread:id=2355054}
    If you have specific questions related to XQuery Update, the best place to ask them is over in the {forum:id=34} forum.

  • Regarding error in xml validation in 7.1

    Hi
    I am getting following error in xml validation in 7.1
    my scenario is IDOC TO FILE
    from idoc DATE_TIME field comes with 14 digits. In the target I created DATE_TYPE field with data type
    "dateTime" and in details column pattern section I mentioned yyyyMMddHHmmss.while doing xml validation in I am gettting this error:(xml validation done in receiver agreement validation by Integrtion engine)
    cvc-pattern-valid: Value '20080213081220' is not facet-valid with respect to pattern 'yyyyMMddHHmmss' for type 'null'
    Please give me some inputs on this.
    Regards
    venkat.

    Hi,
    try this - update your target msg xsd in your XI folder........rerun your scenario and see if this error is still there..........
    if this error remains same, then in IR in data type, remove your pattern and just keep dateTime as datatype.......again update your xsd in XI folder.........rerun your scenario.
    Regards,
    Rajeev Gupta

  • XQuery Update Facility in XMLDB?

    Hi
    I didn't find information about XQuery Update Facility
    support or XUpdate support in Oracle XML DB. Do you have
    such info?
    Regards,
    --drkm                                                                                                                                                                                                                                                                                                                           

    Xquery update is NOT anywhere near well enougth defined for us to implement it at present. We are actively involved in the standards process for XQuery update. It's very unclear what the future of the XUpdate is at this point...
    We support node-level updates through a set of SQL functions
    updateXML (9iR2 and later), insertChildXML, appendChildXML, insertXMLBefore and deleteXML (10gr2 and later)
    Message was edited by:
    mdrake

  • Decreasing performance when executing consecutive XQuery Update operations

    hello,
    I am writing an application in java using Berkeley DB XML (2.5.16). I have to run a test over the application, in which a lot of XQuery Update operations have to be executed. All update operations are insert statements. In the beginning the test works fine. However, as the number of updates increases (over 1000 XQuery Updates), there is also a great increase in time of execution. How can I enhance the performance of updates?
    Note that:
    1) The environment configuration is the following:
    EnvironmentConfig envConfig = new EnvironmentConfig();
    envConfig.setAllowCreate(true);
    envConfig.setInitializeCache(true);
    envConfig.setCacheSize(512*1024*1024);
    envConfig.setInitializeLocking(false);
    envConfig.setInitializeLogging(false);
    envConfig.setTransactional(false);
    2) No transactions are used
    3) The container is a node container
    4) Auto-indexing is on (I need that)
    5) The container includes only one xml of 2,5MB size.
    6) In some insert statements 1000 nodes are to be inserted.
    7) I am running windows vista on a 4GB Ram pc.
    Thank you in advance,
    theo

    Hi Lucas,
    Thanks a lot for your reply! However, I have a few more questions.
    Given that the xml is about 2.5MB size, is it considered to be that big for Berkeley DB so it needs to be break down into smaller documents?
    Also, after having executed ~4000 xquery update insert operations and doubled xml’s size, the performance it’s really getting worse… An insertion may even take 1.5 min, when for each of the first 3000 insertions only less than 0.5 sec is needed… Is there something I am missing in the configuration of Berkeley DB? If I set autoindexing off and try to maintain fewer indexes, is it possible to see significantly better performance? Till now I am just getting the following error when I set my indexes and try to execute consequent insertions over the same node:
    Exception in thread "main" com.sleepycat.dbxml.XmlException: Error: Sequence does not match type item() - the sequence does not contain items [err:XUDY0027], <query>:1:1, errcode = QUERY_EVALUATION_ERROR+
    at com.sleepycat.dbxml.dbxml_javaJNI.XmlQueryExpression_execute__SWIG_1(Native Method)
    at com.sleepycat.dbxml.XmlQueryExpression.execute(XmlQueryExpression.java:85)
    +<myClasses>+
    Thanks,
    theo

  • XQuery Update (11.2.0.3) and the path table

    Hi,
    I'm currently using XQuery update on 11.2.0.3 to merge 2 XML documents, having tried a number of approaches up to now on 11.2.0.2.
    My table has one XMLType column (securefile binary containing unstructured xml) which has XML deltas applied to it via a stored procedure.
    An unstructured XML index is defined on the column.
    Previously, I was doing the following:
    1) Merge documents using XMLQuery; only produce a merged document if changes were detected
    2) Update the table if the merged document is non-null
    i.e.
    select XMLQuery(<merging code>) passing oldDoc as "oldDoc", delta as "delta" returning content) into mergedDoc from dual;
    if (mergedDoc is not null) then
        update myTable set xmlDoc = mergedDoc where id=v_id;
    end if;However, this replaces the entire document if any changes are detected (with an obvious impact on the path table).
    I then read (UpdateXML query rewrite with unstructured data? about the use of XQuery Update in 11.2.0.3 to only target the affected document fragments so my current approach is:
    update myTable
    set xmldoc =
            xmlquery('declare namespace m="http://www.blah.com/merge";
            (: See if two nodes have matching text (or no text which is an empty sequence :)
            declare function m:matchText($one as element(), $two as element()) as xs:boolean {
                if ($one/text() = $two/text() or count($one/text())=0 and count($two/text())=0) then true() else false()
            declare updating function m:merge($old as element()?, $new as element()?) {
                (for $o in $old/* return
                    for $n in $new/* where name($o) = name($n) return
                        if (count($n/*) > 0) then
                            m:merge($o, $n)
                        else
                            if (m:matchText($n, $o)) then () else replace value of node $o with $n,
                    for $n in $new/* where (not(some $o in $old/* satisfies name($o) = name($n))) return insert node $n into $old)
            copy $d := .
            modify (
                (m:merge($d/*,$delta/*))
            ) return $d'
            passing xmldoc, delta as "delta"
            returning content)
    where id = v_id;If no changes were detected between the documents (i.e. the XQuery update did not actually modify the document), would you expect this statement to have no impact on the path table? Is there any way to get more trace information which shows what the update is actually doing when it executes?
    Apologies if this is overlong or if I have omitted any supplementary information.
    Thanks for any assistance
    Larry

    Hi,
    many thanks for your reply.
    A simple testcase is below. The recursive approach is required because the documents may be hierarchial.
    create table mytable (id number(19,0), xmldoc xmltype) xmltype column "XMLDOC" store as securefile binary xml;
    insert into myTable values (1,xmltype('<xml><el1>1</el1><el2>2</el2><el3>3</el3></xml>'));
    update myTable
    set xmldoc =
            xmlquery('declare namespace m="http://www.blah.com/merge";
            (: See if two nodes have matching text (or no text which is an empty sequence :)
            declare function m:matchText($one as element(), $two as element()) as xs:boolean {
                if ($one/text() = $two/text() or count($one/text())=0 and count($two/text())=0) then true() else false()
            declare updating function m:merge($old as element()?, $new as element()?) {
                (for $o in $old/* return
                    for $n in $new/* where name($o) = name($n) return
                        if (count($n/*) > 0) then
                            m:merge($o, $n)
                        else
                            if (m:matchText($n, $o)) then () else replace value of node $o with $n,
                    for $n in $new/* where (not(some $o in $old/* satisfies name($o) = name($n))) return insert node $n into $old)
            copy $d := .
            modify (
                (m:merge($d/*,$delta/*))
            ) return $d'
            passing xmldoc, xmltype('<xml><el1>1-UPDATE</el1><el4>4</el4></xml>') as "delta"
            returning content)
    where id = 1;This results in one update and one insert:
    <xml><el1>1-UPDATE</el1><el2>2</el2><el3>3</el3><el4>4</el4></xml>It currently produces the following trace:
    *** 2012-03-13 10:13:34.708
    not delete/insert/replace in modify clause
    --------- XQuery NO rewrt expr END-----
    --------- XQuery NO rewrt expr BEG-----
    UDF with noderef
    --------- XQuery NO rewrt expr END-----I've noticed that even with a simple XQuery update like the following:
    update myTable set xmldoc =
            xmlquery('copy $d := .
            modify (
                (replace value of node $d/xml/el1 with "1-UPDATE-2",insert node <el4>4</el4> into $d/xml)
            ) return $d'
            passing xmldoc
            returning content) where id = 1;I get the following trace:
    *** 2012-03-13 10:31:42.280
    --------- XQuery NO rewrt expr BEG-----
    non-simple content in target expression
    --------- XQuery NO rewrt expr END-----
    --------- XQuery NO rewrt expr BEG-----
    not delete/insert/replace in modify clause
    --------- XQuery NO rewrt expr END-----
    Non-iterator usage
    Non-iterator usageDoes this also indicate that a rewrite is not occurring, or is this only when a message like "NO REWRITE Reason ==> xseq:not optuop" is traced?
    I'll try XSLT in the meantime.
    Regards
    Larry

  • XML validation in sender file adapter

    Hi
    I am using FCC on the sender file adapter ....i need to make sure that one of the fields should always be integer else the sender adapter should give error
    Can i use xml validation with FCC on the sender file adapter?

    Hi Hema,
    As per understanding you need to check one or few fields value is integer or not.
    You can achieve in 2 ways :
    Case1:Using inbuilt xml validation options.
    For 7.11 and below
    1)In ESR/Message type/Export the xsd to local machine.
    2)Insert the xsd file in the below loc
    /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/
    <guid>/<namespace1>/<service_interface_name>/<namespace2>
    <sid>: System ID of the server instance.
    <guid>: The GUID of the SWCV.
    <namespace1> : The namespace within which the service interface is defined.
    <service_interface_name> : The name of the service interface.
    <namespace2>
    : The namespace of the Message Type used by the service interface. In many
    instances, namespace1 and namespace2 are the same.
    Italic path folders need to create by you.
    For 7.3 and above
    Michal's PI tips: XML validation - changes in 7.3
    Case 2 :Handling using simple UDF.
    Input-->UDF-->Output
    try {
       Integer.parseInt(input);
       return input ;
    catch(NumberFormatException e) {   
    throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
    Regards
    Venkat

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • XML Validation in PI 7.1 - Restart and skip validation possible, but how?

    Hello all,
    I read about schema validation in PI 7.1 and did a few tests on my own, but could not restart and skip validation for invalid payloaded messages. The documents say it is possible.
    Anyone know how? Thanks.
    BTW, I really think putting the schemas in server file system will cause a lot of authorization trouble in enterprises. No one gives access to the server filesystem and I don't think they will also like to open the required subdirectories for share. Asking the basis team to create the folder structures and maintaining schemas would be another pain. Don't you also think that SAP could find a better approach, like automatically uploading the schemas to the filesystem, or validating them from repository directly if possible?
    Kind regards,
    Gökhan

    Hi Gökhan,
    I am facing the same issue.
    I set up outbound xml validation in receiver agreement and tested it with valid and invalid messages.
    The validation works fine.
    But in case of validation error I tried to restart with skipping the validation. But this wasn't possible.
    I am always facing the same valdiation error.
    I already tried all different tools I know (sxi_monitor, message monitoring in rwb and in nwa)
    I am working on PI 7.11 SP6
    Did you find a solution for skipping the validation for a single message out of the monitoring?
    I know that there is the possibility of deactivate the validation in receiver agreement but thid doesn't meet the requirement of skip the validation only for a single message.
    Maybe anyone else faced and solved this issue already.
    Thanks in advance
    Jochen

  • XML Validation - How to raise an alert

    Hi PI Experts,
    I enabled XML validation at "Validtion by Adapetr Engine". Its working fine. But how to integrate XML validation error with Alert Monitoring. Please advise.
    Here below the error from Audit log:
    2010-03-18 18:33:13     Information     The application tries to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.
    2010-03-18 18:33:13     Information     Backward validation is enabled
    2010-03-18 18:33:13     Error     Unable to validate the message with message ID b01d356e-1801-4b93-29fb-9ed84b25c6a3
    2010-03-18 18:33:13     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    2010-03-18 18:33:13     Error     MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    2010-03-18 18:33:13     Error     File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    Thanks...
    Ravi Kanakam

    Hi Ravi,
    Are you getting other adapter engine alerts? Or only you are not getting xml validation ones? Also take a look at this:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    Regards,
    ---Satish

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • XML Validation

    Since there is no XML validation currently in the Flex/Flash framework, I've decided to start a class that parses a string in an effort to validate the markup, returning whether the XML is valid. I have a need for it in my non-server based application, and have read in numerous places where there is desire for it as well. I have built the class far enough to get the ball rollin', but figure it should be :
    A) available to the community
    B) able to be improved upon by the community
    If you improve upon the code, please post your work here so everyone can benefit.
    Here is the source code :
    XML Validator : v0.2 - last edit by Justin Myers | J2 CREATIVE MEDIA DESIGN
    NOTES:
    Parser is a bit weak and needs work.
    Still need to :
    - Make sure tags are ended properly
    - Make sure there is space between tag name and attribute
    Parser currently handles :
    - Making sure there is no space between tags (with exception to white space)
    - Making sure that attributes open and close properly
    - Making sure there is proper space after an attribute or that it is immediately followed with the tag closing
    package community.classes.parsers
           public class XMLValidator
                  public function XMLValidator()
                  public static function validate(str:String , ignoreWhiteSpace:Boolean = true):Boolean
                          // validation defaults to true (innocent til proven guilty)
                          var valid:Boolean = true;
                          // minimum char length to be valid XML
                          if (str.length < 4)
                                 valid = false;
                          var withinTag:Boolean;
                          var withinAttribute:Boolean;
                          var tags:Array = [];
                          var tag:String;
                          for (var i:uint = 0 ; i < str.length ; i++)
                                 var char:String = str.charAt(i);
                                 // if we are closing a tag
                                 if (char == ">")
                                        // invalid if we never opened a tag, or if we never closed the last attribute
                                        if (!withinTag || withinAttribute)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = false;
                                               tags.push(tag);
                                 // invalid if last character is not a closing tag
                                 else if (i == str.length - 1)
                                        valid = false;
                                        break;
                                        // if we are entering a tag
                                 else if (char == "<")
                                        // invalid if we haven't closed the last tag
                                        if (withinTag)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = true;
                                               tag = "";
                                        // all other characters
                                 else
                                        if ((char != " " || char != "\n") || ((char == " " || char == "\n") && !ignoreWhiteSpace) )
                                               // invalid if there are any characters between tags
                                               if (!withinTag)
                                                      valid = false;
                                                      break;
                                               else
                                                      if (char == "\"")
                                                              // entering attribute
                                                              if (!withinAttribute)
                                                                     // invalid if = does not preclude ", or there is space before =
                                                                     if (str.charAt(i-1) != "=" || str.charAt(i-2) == " ")
                                                                            valid = false;
                                                                            break;
                                                                     else
                                                                            withinAttribute = true;
                                                                     // exiting attribute
                                                      

    961190 wrote:
    so whats the best way to store Rules?
    How to get the data validated with those rules given the source data is in a xml file
    The "integrity rules"?
    Since they have to be ececutable code I'd suggest Java classes...
    How to get the data validated with those rules given the source data is in a xml file
    as @hsc71 wrote, that each XML element select the rules this particular element should pass and run each rule with the current element as parameter.
    This meight be easiser in the Rules have a common interface like
    interface Rule{
      public boolean isPassedBy(XmlElement theCurrentElement, XmlElement theRootElement);
    You could use the ServiceRegistry class from the JVM to fetch the known rules, so that you can add new ones with minimum effort.
    bye
    TPD

Maybe you are looking for

  • The BPM Workspace is loading and failing to initialize the directory.xml

    Hi BPM Specialists, I installed BPM along with SOA suit in Windows XP box. Now I am getting failing to initialize directory.xml error and the workspace is not getting loaded.I am not able to locate a directory.xml file in my installed directory. Plea

  • How to change state of a constraint from DEFERABLE to IMMEDIATE?

    Hi, I am runnig 10gR2 and would like to change state of a constraint from DEFERABLE to IMMEDIATE without recreating it. The change is working at the session level with SET CONSTRAINT <constraint name> IMMEDIATE; But this is not visible for other user

  • Photo App not opening (iPhone iOS 5)

    So, i updated my iPhone 4 to iOS 5, absouletely everything works. I then updated my mother's iPhone 4 to iOS 5, there the exact same phone (I just dont sync photos on the computer with my phone, with hers i do) However on her phone, when u click the

  • QM Inspection Type for SD Delivery in Returned Goods

    hi experts, Any ideas on how to do stock postings in Iinspection Lots that are automatically created upon return delivery I want to post to inspection stock once the Delivery has been completed. The standard SAP automatic Inspection Lot that is creat

  • Can not start up ICM

    dear, My environment: OS: OUL5x64 EBS R12 12.0.6 After power outage now i could not startup CM on the applicationTier. below is the error. i did recompile all error objects ( about 66) but after recompiled i still has 66 and one of the error point to