XML Schemas: Regex for empty string?

Hi Folks,
It appears that the new Oracle schema processor has a bug in processing regular expressions.
Example. Create a regular expression which allows a string of characters 5-10 characters in length, or empty.
Here's the regex:
[a-zA-Z]{5-10}|()
When I use this in a pattern facet and in my instance document create an empty element for this type it gives me an error message (sorry, I don't recall the exact message).
/Roger

Roger, empty expr is illegal in current implementation. We will add this support in next release.
Thanks,
Oracle XML develop team

Similar Messages

  • 3rd party integration: How to get XML Schema (.xsd) for a custom entity, to use with a mapper

    Is there an easy way to get the xml schema/DTD for a custom entity, specifically an .XSD file for that entity (which will then be used to create a map to be able to transform the fields of the entity to a 3rd-party message format)?
    So have a custom entity with lots and lots of fields. Each of the fields will map to a differently named field to match the schema of the 3rd party entity. A very common situation. Looking to use a tool like the Biztalk mapper or Altova's MapForce to generate
    an .xslt file to transform the downloaded entity (service.Retrieve with all columns) to the new format. (Will implement a typical VETR pattern.)
    Apparently with CRM 4 there was a call that provided this, but from 2011 has not been available. Working with a crm 2015 system.

    That will give a descriptor of the table and allow creation of an .XSD file, but it's really complex in terms of types, and the there's type conversion. It might be an easy way to get a schema, with the downside being it's hard to use that schema. 
    It seems easier to do a fetch of the record with all fields filled in using service.Retrieve, and then converting this to xml, using Microsoft's guidance leads to using https://msdn.microsoft.com/en-us/library/hh675409.aspx which will serialize the entity
    into XML with all the fields converted to type string, and with complex fields likewise converted to strings with additional information about the type. 
    Using this it's possible using an number of tools to create an easier to use .XSD file.
    However, it would seem most integrations of this type are using 3rd party CRM connectors. Perhaps this is why Microsoft hasn't provided anything direct (and took away what they did have in crm4.0 due to it generating a hard to use .XSD or due to letting
    their partners continue income streams from selling connectors").
    But without using 3rd party connectors, or following the still tedious method of generating .XSD (a useable .xsd), have not yet come up with an easy, automatic way to get an .XSD or to easily integrate with 3rd party message format.

  • Problem with running sample code from XML Schema Processor for Java

    Hi there,
    I downloaded the XML Schema Processor for Java and tried it out. Unfortunately, it failed at the first step. FYI, I included all xmlparserv2.jar and xmlschema.jar in my classpath.
    I compiled XSDSample.java with a warning: XSDSample.java uses a deprecated API. Recompile with "-deprecation" for details. There was no problem with compiling XSDSetSchema.java.
    When I tried to run report.xml by typing java XSDSample report.xml, I got Parsing report.xml
    NonParserException: null.
    I guess that report.xml from the sample is not valid.
    Could any one give me a hint? Any suggestion would be greatly appreciated.
    ---Denali
    null

    Please post this message at:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » XML DB

  • [JAXB 2.x] Defining the XML Schema Type for XmlElementDecl

    How can an XML Schema Type (XmlSchemaType) be defined for an XmlElementDecl/Ref?
    The classes are as follows:
        @XmlRegistry
        class ObjectFactory {
            // XmlSchemaType is desired, but cannot be used with XmlElementDecl/Ref: @XmlSchemaType(name = "unsignedShort")
            @XmlElementDecl(namespace = "urn:com:test:namespace", name = "char", scope = com.test.Arguments.class)
            @XmlJavaTypeAdapter(com.test.CharacterAdapter.class )
            public JAXBElement<Character> createArgumentsChar(Character value) {
                return new JAXBElement<Character>(_ArgumentsChar_QNAME, Character.class, com.test.Arguments.class, value);
        @XmlAccessorType(XmlAccessType.FIELD)
        @XmlType(name = "", propOrder = { "arguments" })
        class Arguments {
            @XmlElementRefs( {
                    @XmlElementRef(name = "char", namespace = "urn:com:test:namespace", type = JAXBElement.class),
            protected List<JAXBElement<?>> arguments;
        }The desired schema is as follows:
        <xs:element name="arguments" minOccurs="0">
            <xs:complexType>
                <xs:sequence>
                    <xs:choice minOccurs="0" maxOccurs="unbounded">
                        <xs:element name="char" type="xs:unsignedShort" />
                    </xs:choice>
                </xs:sequence>
            </xs:complexType>
        </xs:element>However, when generating the schema from these classes (schemagen), the resulting "char" element type is "xs:string," not "xs:unsignedShort" as desired. What annotation can be used to indicate that the type should be xs:unsignedShort? If the addition of an annotation is not possible, are there any other ways to accomplish this?
    Message was edited by: Shelley (Indicated "JAXB 2")

    There are mappings between XSD type and Java type table on the Sun website.

  • SQL query for empty string

    I am trying to execute the following SQl query, SELECT * FROM Failure WHERE ID = '123' AND RepairAction = ' ';, using the DB Tools Execute Query.vi. This query never finds the record in my database. My database contains a record where the ID filed contains the value of '123' and the RepairAction field is an empty string. If I remove the 'AND RepairAction ' ';' text from my query statement, the record is found. I believe my problem is that I am not using the correct syntax to describe and empty string. I have tried the following: '', ' ', "", " ", and NULL as empty string arguments, and none of these work.
    I was hoping someone might be able to tell me what the correct syntax is for an empty string or if there is another approach I need to take.
    Thank you in advance for your help,
    Jim
    Solved!
    Go to Solution.

    Hi,
    While creating your table "Failure", was the column "ID" delclared as intiger or varchar? If it is intiger and you use '123' , it wont return the results. You will have to try without the inverted comas ' '.
    Regards,
    Nitzz
    (Giver Kudos to good Answers, Mark it as a solution if your problem is Solved)

  • Using Convert to handle NULL values for empty Strings ""

    After having had the problem with null values not being returned as nulls and reading some suggestion solution I added a converter to my application.
      <converter>
        <converter-id>NullStringConverter</converter-id>
        <converter-for-class>java.lang.String</converter-for-class>
        <converter-class>com.j2anywhere.addressbookserver.web.NullStringConverter</converter-class>
      </converter>
    ...I then implemented it as follows:
      public String getAsString(FacesContext context, UIComponent component, Object object)
        System.out.println("Converting to String : "+object);
        if (object == null)
          System.out.println("READING null");
          return "NULL";
        else
          if (((String)object).equals(""))
            System.out.println("READING null (Second Check)");
            return null;       
          else
            return object.toString();
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        System.out.println("Converting to Object: "+value+"-"+value.trim().length());
        if (value.trim().length()==0 || value.equals("NULL"))
          System.out.println("WRITING null");
          return null;
        else
          return value.toUpperCase();
    ...I can see that it is converting my values, however the object to which the inputText fields are bound are still set to empty strings ""
    <h:inputText size="50" value="#{addressBookController.contactDetails.information}" converter="NullStringConverter"/>Also when reading the object values any nulls are already converted to empty strings before ariving at the converter. It seems that there is a default converter handling string values.
    How can I resolve this problem as set nulls when the input value is an empty string other then checking every string in my class individually. I would really hate to pollute my object model with empty string tests.
    Thanks in advance
    Edited by: j2anywhere.com on Oct 19, 2008 9:06 AM

    I changed my converter as suggested :
      public Object getAsObject(FacesContext context, UIComponent component, String value)
        if (value == null || value.trim().length() == 0)
          if (component instanceof EditableValueHolder)
            System.out.println("SUBMITTED VALUE SET TO NULL");
            ((EditableValueHolder) component).setSubmittedValue(null);
          else
            System.out.println("COMPONENT :"+component.getClass().getName());
          System.out.println("Converting to Object: " + value + "< to " + null);
          return null;
        System.out.println("Converting to Object: " + value + "< to " + value);
        return value;
      }which produces the following output :
    SUBMITTED VALUE SET TO NULL
    Converting to Object: < to null
    Info : The INFO line however comes from my controller object where I print out the set value :
    package com.simple;
    import java.util.ArrayList;
    import java.util.List;
    public class Controller
      private String information;
      /** Creates a new instance of Controller */
      public Controller()
        System.out.println("Createing Controller");
        information = "Constructed";
      public String process()
        System.out.println("Info : "+getInformation());
        return "processed";
      public String reset()
        setInformation("Re-Constructed");
        System.out.println("Info : "+getInformation());
        return "processed";
      public String setNull()
        setInformation(null);
        System.out.println("Info : "+getInformation());
        return "processed";
      public String getInformation()
        return information;
      public void setInformation(String information)
        this.information = information;
    }I also changes my JSP / JSF page a little. Here is the updated version
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
        This file is an entry point for JavaServer Faces application.
    --%>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
      </head>
      <body>
        <f:view>
          <h:form>
            <h:inputText id="value" value="#{Controller.information}"/>
            <hr/>
            <h:commandLink action="#{Controller.process}">
              <h:outputText id="clicker" value="Process"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.reset}">
              <h:outputText id="reset" value="Reset"/>
            </h:commandLink>             
            <hr/>
            <h:commandLink action="#{Controller.setNull}">
              <h:outputText id="setNull" value="Set Null"/>
            </h:commandLink>             
          </h:form>
        </f:view>
      </body>
    </html>The converter is declared for the String class in the faces configuration file. From the log message is appears to be invoked, however the object is not set to null.
    I tested this with JSF 1.2_04-b20-p03 as well as 1.2_09-b02-FCS.
    any other suggestions what could be causing this.

  • XML SCHEMA registration for XML TYPE (storing XML files in Oracle 10g)

    I have created the XML Schema for the XML file stored in Oracle 10g and also added this Schema into the database. I have related that schema with the column in the table which contains the XML file. When i execute the query to fetch the data from the stored file i am getting a blank resultset. Is registering the XML Schema is necessary, if yes then please let me know the process of doing it. I have tried following steps to register Schema, but it is not working
    Step1:
    DECLARE
    v_return BOOLEAN;
    BEGIN
    v_return := dbms_xdb.createFolder('/home/');
    v_return := dbms_xdb.createFolder('/home/DEV/');
    v_return := dbms_xdb.createFolder('/home/DEV/xsd/');
    v_return := dbms_xdb.createFolder('/home/DEV/messages/');
    v_return := dbms_xdb.createFolder('/home/DEV/employees/');
    COMMIT;
    END;
    STEP 2:
    Connecting To XML DB
    Step3:
    Register XML schema
    I am failing to execute step number 2 and hence not able to register the schema also.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by sudeepk:
    If a java exception is thrown probably during ur install u might have forgotten
    grant javauserpriv to scott;
    grant javasyspriv to scott;
    Thanks
    [email protected]
    <HR></BLOCKQUOTE>
    Thank you!!!

  • Error downloading XML schema processor for java from OTN

    I'm getting error downloading this product from otn site. http://technet.oracle.com/tech/xml/schema_java/index.htm
    I login to OTN, go to this site, enter registration information and then I get the following error when I try to submit my info.
    Runtime error occured. Do you wish to debug?
    Line: 20
    Error :'e_mail_valid' is undefined.
    When I say 'No' for debug, it takes me to 'XML parser for java' download page instead of 'XML Schema processor'.
    please help.
    thankx
    null

    The 'e_mail_valid' is undefined" has to do with the format of or lack of the email address. The routing problem is ours and should be fixed later today or by tomorrow morning.
    Thanks,
    Oracle XML Team

  • Write REGEX for a string pattern

    Hi All,
    I am new to using regular expression and writing the patterns, I am looking to write a pattern for below formats and do a FIND REGEX:
    A123456-01-123456789-123   and A123456-01-123456789-ABC
    DATA: regex TYPE REF TO cl_abap_regex,
          res   TYPE        match_result_tab,
          text  TYPE        string.
    CREATE OBJECT regex
        EXPORTING pattern      = '\(.\)\1'
                  simple_regex = 'X'
    FIND ALL OCCURRENCES OF REGEX regex IN text RESULTS res.
    could you help me write the pattern to check if user has entered string in formats A123456-01-123456789-123   and A123456-01-123456789-ABC
    Thank you
    Depp

    Hi Manish,
    First of all sorry for getting back so late..was stuck with project delivery...and Thank you for your solution. Only one scenario failed i.e., I didn't mention that the value 01 in the examples, is constant in strings A123456-01-123456789-123   and A123456-01-123456789-ABC.
    which means it has to be always 01 any other value than 01 the sy-subrc should not be zero.
    I will also be thankful if you could share me the document(s) which help us write the above patterns( '^\w\d{6}-\d{2}-\d{9}-\d{3}$' ; '^\w\d{6}-\d{2}-\d{9}-\w{3}$' ).
    In the meanwhile I will also do some R&D with your reply to solve the failed scenario.
    Regards,
    Depp

  • SQLLDR - how to set a default value for an empty string

    I'm using SQLLDR to load data from a flat file on Oracle 10g 10.2.0.4 EE, Linux RHEL 4 update 6. Seems like my question is simple, but darned if I can't find the solution.
    My source file (comma delimited extracted form a different RDBMS) has some (not all) rows where the output for a string is "", and not NULL. How do I check for empty string and add a default value in the control file? The target column is non-nullable
    Here's my current control file - however, the column attributeName where sometimes the source record is "" does not get evaluated as NULL.
    load data
    infile 'mydata.del'
    badfile 'mydata.bad'
    discardfile 'mydata.dsc'
    into table mydata
    fields terminated by "," optionally enclosed by '"'
       TRAILING NULLCOLS           
    (l_metadata,
    company,
    className,
    attributeName "decode(:vc_attributeName,null, 'none')",
    attributeDefault)
    {code}
    When I tried decode with "", I received the following error:
    {code}SQL*Loader-350: Syntax error at line 11.
    Expecting "," or ")", found ", 'none')".
    attributeName "decode(:vc_attributeName,"", 'none')", {code}
    This does not work either:
    {code}
    load data
    infile 'mydata.del'
    badfile 'mydata.bad'
    discardfile 'mydata.dsc'
    into table mydata
    fields terminated by "," optionally enclosed by '"'
       TRAILING NULLCOLS           
    (l_metadata,
    company,
    className,
    attributeName NULLIF attributeName = BLANKS ,"decode(:vc_attributeName,null, 'none')",
    attributeDefault) I get the following in the log:
    Table COMPANYMETADATA, loaded from every logical record.
    Insert option in effect for this table: INSERT
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    L_METADATA                          FIRST     *   ,  O(") CHARACTER
    COMPANY                            NEXT     *   ,  O(") CHARACTER
    CLASSNAME                         NEXT     *   ,  O(") CHARACTER
    ATTRIBUTENAME                     NEXT     *   ,  O(") CHARACTER
        NULL if ATTRIBUTENAME = BLANKS
        SQL string for column : "decode(:attributeName,null, 'none')"
    ATTRIBUTEDEFAULT                  NEXT     *   ,  O(") CHARACTER
    Record 1: Rejected - Error on table COMPANYMETADATA, column ATTRIBUTENAME.
    ORA-01400: cannot insert NULL into ("SRV5"."COMPANYMETADATA"."ATTRIBUTENAME")
    {code}
    Any help is appreciated -
    Edited by: kpw on Feb 9, 2009 11:10 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hello,
    I just loaded following data successfully in my_data table using the same control file I posted. Yes it will evaluate "" as null and replace with none, remember in control file you have this option, "optionally enclosed by '"'.
    #my_data.dat
    "myname1", "attribname1"
    "myname2", "attribname2"
    "myname3", "attribname3"
    "myname4", ""
    #my_data.ctl
    load data
    into table my_data
    fields terminated by "," optionally enclosed by '"'
    TRAILING NULLCOLS           
    my_name char(30),
    vc_attributeName "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
    {code}
    Here is the output log file
    {code}
    Control File:   my_data.ctl
    Data File:      mydata.dat
      Bad File:     mydata.bad
      Discard File:  none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 50
    Bind array:     64 rows, maximum of 256000 bytes
    Continuation:    none specified
    Path used:      Conventional
    Table MY_DATA, loaded from every logical record.
    Insert option in effect for this table: INSERT
    TRAILING NULLCOLS option in effect
       Column Name                  Position   Len  Term Encl Datatype
    MY_NAME                             FIRST    30   ,  O(") CHARACTER           
    VC_ATTRIBUTENAME                     NEXT     *   ,  O(") CHARACTER           
        SQL string for column : "decode(:vc_attributeName,null, 'none', :vc_attributeName)"
    Table MY_DATA:
      4 Rows successfully loaded.
      0 Rows not loaded due to data errors.
      0 Rows not loaded because all WHEN clauses were failed.
      0 Rows not loaded because all fields were null.
    Space allocated for bind array:                  18560 bytes(64 rows)
    Read   buffer bytes: 1048576
    Total logical records skipped:          0
    Total logical records read:             4
    Total logical records rejected:         0
    Total logical records discarded:        0
    Run began on Mon Feb 09 18:17:35 2009
    Run ended on Mon Feb 09 18:17:36 2009
    Elapsed time was:     00:00:00.98
    CPU time was:         00:00:00.10
    {code}
    Hope this helps clearing your dobuts
    Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Where to find the Xml Schema details of the ABODE extension(xmlns:ADBE) for the JDF

    Hi There,
    I had been working on dynamic creation of JDF file for processing the job via Adode PDF print Engine. However, I need to know the various JDF attribtues which were available in the adode namespace [xmlns:ADBE="http://ns.adobe.com/JDF" this link was no more accessible via internet]
    Could you please provide with the link where i can find the adobe namespace details. OR
    Can some provide me the xml schema file for the adobe extension ?
    please reply asap.
    Thanks in advance.

    Hi Steve,
    Generally when you need to find out parameters you would test a working one to see what is present so you can just replicate this.
    Therefore I would suggest that you set the Business partner subscription for the xml site type and other required settings.  Then make a change to a business partner and see the output of the xml file to see the parameters you will need.
    Hope this gets you on the right path for the solution.
    Cheers
    Andrew

  • Regular Expressions and XML Schemas

    The standard regular expression syntax in JDK1.4 doesn't support some of the constructs used by pattern facets in XML schemas.
    For example the "Name" type is specified by the pattern "\i\c*" but the java.util.regex regular expression handler throws an exception when it encounters this with the following message:
    Illegal/unsupported escape squence near index 1
    Is anyone aware of any regular expression java libraries or tools that will cope with the XML syntax?

    Thanks, but perhaps I should clarify. I realise that \i\c* is invalid syntax in the java regexp handler. My point is that in XML Schema regular expressions \i is meaningful - in fact it means
    "the set of initial name characters, those matched by Letter | '_' | ':' "
    I was wondering if anyone knew of a regular expression library that understood and correctly interpreted that.

  • XML Schema Component Naming Convention

    Is there a naming convention when you create an XML Schema? For example,
    When you create a Type component, then the first letter of its name should be upper case ie. BMW, Honda, AutombileEngine ...etc.
    When you create an Element component, then the first letter of its name is lowercase ie. engine, car, guestCar ..etc.
    Do we have such naming convention for XML Schema?
    Thanks

    I am giving this from my document which i prepared for one of my customer
    2     General Guidelines for design of XML schema documents
    The representation of data in an XML format will be a key component of development within SOA. Therefore, the design and development of XML schemas should be as rigorous an activity as designing and developing code or designing database schemas. As such, when creating an XML schema you should be working within a development process and working to a set of design guidelines and coding standards (when writing the XML schema file). XML schemas should be reviewed for accuracy and compliance with guidelines and standards. Each of the requirements in the list below is a general requirement for all XML schemas to be deployed in the SOA environment.
    •     Understandable: XML schemas should be clear, consistent and unambiguous. They should contain human readable documentation and, where appropriate, links to requirements or design documents.
    •     Semantically Complete: An XML schema should define, for one or more target XML documents, each and every element and attribute that is understood by your solution when processing target documents.
    •     Constraining: XML schemas are used as contracts between both publisher and consumer. As such, they must be able to be validated as concisely as possible. When designing an XML schema constraints should be identified for the values for all the elements and attributes that the application uses and relies on to the set of values that the application can handle. A valid document should imply valid data within the limits of what can be specified by the XML Schema language.
    •     Uniquely identifiable: XML schemas should import and include other XML schema files rather than duplicating types and elements locally.
    •     Reusable: XML schemas should be specified in such a way that types and other XML schemas can leverage elements. Every type defined in an XML schema that is the content type of an attribute or an element should be defined globally (i.e., at the top level in the Schema). Types that are defined globally can be reused in other XML schemas. Schemas should be separated into logical sections which can be included into the main schema file.
    •     Extensible: Schemas should be designed to be extensible—that is, new elements and attributes can be inserted throughout the document.
    Every schema should use at least two namespaces – the targetNamespace and the XML Schema (http://www.w3.org/2001/XMLSchema) namespace.
    Create typed elements that can be referred to by object elements:
    Example:
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.soa.com"
    xmlns="http://www.soai.com"
    elementFormDefault="qualified">
    <xsd:complexType name="PersonType">
    <xsd:sequence>
    <xsd:element name="Name" type="xsd:string"/>
    <xsd:element name="SSN" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.company.org"
    xmlns="http://www.company.org"
    elementFormDefault="qualified">
    <xsd:include schemaLocation="Person.xsd"/>
    <xsd:include schemaLocation="Product.xsd"/>
    <xsd:element name="Company">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="Person" type="PersonType" maxOccurs="unbounded"/>
    <xsd:element name="Product" type="ProductType" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    •     Recognize that with XML Schemas you will not be able to express all your business rules.
    o     Express those business rules using XSLT.
    •     Use type definitions
    Elements vs Attributes
    •     Use attributes for metadata about the parent element.
    •     Use attributes for data that is semantically tied to the enclosing element.
    •     Use elements for data that have a meaning separate from the enclosing element.
    •     Use attributes when the value will be frequently present in order to improve the human readable form of an XML instance document or reduce its size.
    •     If you don't know which to use, then use the element form (which is more extensible).
    2.1.1     Element, Types and attribute names
    Create a descriptive name without it being excessively long (no more than 32 characters).
    Elements and Types should be named in Upper Camel Case. Upper Camel Case capitalizes the first character of each word and compounds the name (remove all whitespace).
    Attributes should be named in Lower Camel Case. Lower Camel Case capitalizes the first character of each word except the first word and compounds the name.
    Simple and Complex type names
    XML Schema has separate symbol space for elements and types so they may have the same name. The best practice is to append the word "Type" to all simple and complex type names to aid in human readability and comprehension.
    Element, attribute and type names MUST be in a singular form unless the concept itself is plural.
    2.1.1.1     XML Schema versioning
    Use major and minor version tracking:
    Major—completely different structure and semantics, most likely not backward compatible
    Minor—backward compatible changes which introduce new features without removing or changing the semantics of existing structures
    2.1.1.2     Indication of version in the namespace URI
    Specify a namespace URI as follows
    http://$domain/$groupSpecifier/$namespaceTitle/$version
    The groupSpecifier can include several levels, e.g., /www.soa.com/SOA/USA/.
    An example namespace could be:
    http://www.soa.com/SOA/order/2

  • Extract the job advertisement into a XML-Schema

    Hi there,
    I have to extraxt the job advertisements in a xml-Schema for making our E-Recruiting compatible to a job-exchange.
    Is there a report or tc or something else which extracts the information of the  job advertisement in a xml?
    Or if not how and where can I read out my Informations about the company or the duration of my job advertisement e.g.
    And after I have this information, how can I prepare the information into a dtd (XML-Schema)
    Thx for answers

    Yes, in fact I solved to do that, now I'm getting a differente problem, I'm trying to get the content to a file, but with no success, I'm getting just "[Document]: #null" into my file, maybe I'm doing something wrong when I try to write it, here's my code in case you or someone else can help me telling me what do I really have to do, thanks in advance.
    public class XMLTransformer {
    public static void main(String[] args) throws Exception {
    try {
    String xml_doc = //"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
    //"<!DOCTYPE web-app PUBLIC \"C:\\sms.dtd\">\n" +
    "" +
    "<root>\n" +
    "<sms>\n" +
    "<tlf>584123161640</tlf>\n" +
    "<op>D</op>\n" +
    "<sc>3344</sc>\n" +
    "<body>MENSAJE</body>\n" +
    "</sms>\n" +
    "</root>";
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    //Document document = builder.parse(xml_doc);
    InputSource inStream = new InputSource();
    inStream.setCharacterStream(new StringReader(xml_doc));
    Document doc1 = builder.parse(inStream);
    File f1 = new File ("c:/salida.xml");
    FileWriter out1 = new FileWriter(f1);
    PrintWriter wr = new PrintWriter(out1);
    f1.createNewFile();
    //String inputLine;
    //while ((inputLine = lector.readLine()) != null)
    wr.write(doc1.toString());
    //lector.close();
    out1.close(); }

  • How to check empty string and null? Assign same value to multiple variables

    Hi,
    1.
    How do I check for empty string and null?
    in_value IN VARCHAR2
    2. Also how do I assign same value to multiple variables?
    var_one NUMBER := 0;
    var_two NUMBER := 0;
    var_one := var_two := 0; --- Gives an error
    Thanks

    MichaelS wrote:
    Not always: Beware of CHAR's:
    Bug 727361: ZERO-LENGTH STRING DOES NOT RETURN NULL WHEN USED WITH CHAR DATA TYPE IN PL/SQL:
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is NOT null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> alter session set events '10932 trace name context forever, level 16384';
    Session altered.
    SQL> declare
      2    l_str1   char (10) := '';
      3    l_str2   char (10) := null;
      4  begin
      5  
      6    if l_str1 is null
      7    then
      8      dbms_output.put_line ('oh STR1 is null');
      9    elsif l_str1 is not null
    10    then
    11      dbms_output.put_line ('oh STR1 is NOT null');
    12    end if;
    13  
    14    if l_str2 is null
    15    then
    16      dbms_output.put_line ('oh STR2 is null');
    17    elsif l_str2 is not null
    18    then
    19      dbms_output.put_line ('oh STR2 is NOT null');
    20    end if;
    21  end;
    22  /
    oh STR1 is null
    oh STR2 is null
    PL/SQL procedure successfully completed.
    SQL> SY.

Maybe you are looking for

  • CC - Parameter ID for Supplementary Rule.

    HI All, I was trying to create a supplementary rule for the users using transction F-53 and want to restrict the user by the amount in the bank data field in f-53. For the same I had two questions: 1. In doing the same I am stuck up with the Paramate

  • Ibooks disappeared from my iPhone -- here we go again?

    I know that this problem has come up and had been resolved in the past, but I just purchased and downloaded an ibook to itunes on my Macbook Pro, synced it to my iphone via USB --I'm away from wifi in a foreign land for the moment-- and the rest of m

  • Operationwise confirmation in REM

    How to do operationwise confirmation in REM through MFBF to get actual cost of each operation. Aso can I issue raw material against planned order or against reservation in REM like in discrete? Thanks sudhakar

  • Space required for fix pack 1.2

    Hi, I'm attempting to install the fix pack 1.2 for BOE XI 3.1 and it keeps comming up with an error of "Error 1307. There is not enough disk space to install this file: C:\Windows\Installer\ef82f.msp. Free some disk space and click Retry, or click Ca

  • Help! Errors seen during loading of a jsp page.

    Hi all, I'm a newbie in Tomcat and Jsp, whenever my jsp page loads, all these weird errors appeared, the 2Ballpoint_Pen.jpg image with the IOException actually existed. What does the rest of the errors mean? How do I fix them? Does all errors actuall