Specifying Case-Insensitive Element Names in XML Schema

Hope someone knows this!
Is it possible to define an an XML Schema Definition so that Element names in the target XML File can be case insensitive.
At the moment my Parser throws an error if the element names in the XML file do not have the exact same case as the definition in the XML schema.
E.g
In Schema i have:
<xsd:element name="HOSTINVENTORYLINE" type="HostInventoryLineType" maxOccurs="unbounded" minOccurs="0"/>
but in xml file i have
<HostInventoryLine field=""/>
or
<hostinventoryline field=""/>
Does anyone know anyway to get around this, so that the parser accepts the HostInventoryLine element in the xml as an instance of the HOSTINVENTORYLINE element defined in the schema.
Thanks in Advance
JJ
Message was edited by:
[email protected]

You could use substitution groups to handle this. You would need an entry in the schema for each valid capitalization. This won't scale well if you want to be completely case insensitive, but if you only support lower case, upper case, and camel case it should do the trick.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
     <xs:complexType name="HostInventoryLineType">
          <xs:sequence>
               <xs:element name="an-element" type="xs:string"/>
          </xs:sequence>
     </xs:complexType>
     <xs:element name="HostInventoryLine" type="HostInventoryLineType"/>
     <xs:element name="HOSTINVENTORYLINE" type="HostInventoryLineType" substitutionGroup="HostInventoryLine"/>
     <xs:element name="hostinventoryline" type="HostInventoryLineType" substitutionGroup="HostInventoryLine"/>
</xs:schema>-Blaise

Similar Messages

  • Case-Insensitive File Name Search on Unix

    Hello,
    I have a program which runs on a Unix OS and it looks for some files like file.csv, and then reads these files. Basically I know the file name and I look for that file name in a particular directory.
    Now, I want to make my program case-insensitive so that if the file name is file.csv or File.csv or FILE.csv, it should still locate that file and read it.
    Any advice....
    Thanks.

    Thanks.
    Probably I have to get all the file names in that
    directory and then try to match against the file name
    (using ignore case or toUpperCase() maybe), which I
    am looking for.
    Is there a way, where I don't have to get all the
    file names in that directory and can just go and get
    the FileReader Object etc for the file which I am
    looking for.No
    /Kaj

  • How to create case-insensitive account name report?

    We have an account report that allows users to enter part of an account name and return matching results. The prompt is case sensitive but I would like it to be case insensitive. This report uses a report prompt and not a dashboard prompt (if it makes a difference), and I can switch to dashboard prompt if necessary.
    Since the left pane search for Account Name is case-insensitive and you can select case-insensitive when creating account list views, I am hoping there is a way to apply this same functionality to a report.
    I understand I can convert Account Name to upper or lower and tell people to search that way, but that will be a last resort.
    Any suggestions on how to make the prompt value and report results for Account Name case-insensitive?
    Thanks.
    Edited by: user9530733 on Sep 30, 2010 10:51 AM

    Similarly to all this, and even what the OP is looking to accomplish, is the habit of developers attempting to coerce the database object names into the format of their language - usually .net or some such. So they create tables named something like EmpDepProjectStatus which may make their application code all look consistent, but becomes EMPDEPPROJECTSTATUS when created in the database. Why can they not adapt to the database and name the table EMP_DEP_PROJECT_STATUS so that we do not go blind trying to manage their db objects? Is it their teachers that tell them EveryThingMustBeWrittenLikeThisBecauseTheyCannotStandSeperatingTheWordsThatNameObjectsWithSpaces_WHICH_ARE_UNDERSCORES_IN_MOST_ALL_LEGACY_LANGUAGES?
    I do not think that Oracle will ever become case sensitive. Just like COBOL, IMS, IDMS, JCL, BASIC, PL/I, etc. There is just too much code out there that ignores case that it could not be done.
    Unless, of course, Oracle creates a init.ora option to set case sensitive. But I doubt (hope most sincerely) that they will never do that.

  • Case Insensitive File Names in Sender File Adapter

    Hi,
    I've tried my best to search SDN on this issue with no help...
    My sender file name can have any case (upper or lower) e.g.
    ABC_123.txt
    or
    ABc_345.txt
    or
    aBC_456.txt
    However configuring the file name in the sender file channel as 'ABC*' did not work
    only files with name starting with the capital letters ABC got picked up and lower case did not get picked up...
    any suggestions on how this can be overcome
    Thanks
    Bharath Sai

    what if my file name has to be F0215DBFR* ??
    should I give 4*4 = 16 combinations ?
    looks funny... but feasible..
    was hoping SAP has a standard solution like
    [Ff]0215[Dd][Bb][Ff][Rr]* ?
    Anywise.. thanks a lot for your help Satish.. will use this technique (16 combinations for my req..)
    Edited by: Bharath Sai R on Sep 25, 2009 4:37 PM

  • Renaming element names in XML

    I need to rename some nodes in an XMLType. What will be the appropriate way to do this change? Below is an example input followed by the desired output. Notice that some elements have V2 appended at the end in the output.
    (Note: The actual input XML has many more elements that have been omitted in the sample below, only the ones needed to be renamed are shown).
    <Request>
         <OrderList>
              <Orders>
                   <Order>
                        <OrderCode>A</OrderCode>
                        <OrderItems>
                             <OrderItem/>
                        </OrderItems>
                   </Order>
                   <Order>
                        <OrderCode>B</OrderCode>
                        <OrderItems>
                             <OrderItem/>
                        </OrderItems>
                   </Order>
              </Orders>
         </OrderList>
    </Request>
    Desired Output:
    <Request>
         <OrderList_V2>
              <Orders_V2>
                   <Order_V2>
                        <OrderCode>A</OrderCode>
                        <OrderItems>
                             <OrderItem/>
                        </OrderItems>
                   </Order_V2>
                   <Order_V2>
                        <OrderCode>B</OrderCode>
                        <OrderItems>
                             <OrderItem/>
                        </OrderItems>
                   </Order_V2>
              </Orders_V2>
         </OrderList_V2>
    </Request>
    Thanks

    For now, I've used REPLACE to solve the problem. I get String value of the incoming XMLType in a clob, do REPLACE and then change it back to XMLType. The source of the message is an external system. The message comes through a queue. The external system is moving to a new xml message format in an upcoming release. This change is needed only temporarily to handle both new and old messages by the receiving system during the transition period.
    Thanks

  • Not specify servlet tag role-name - web.xml

              Hi all,
              I would like to know the servlet configuration in web.xml file. What is the difference
              between specification tag <role-name> and do not have tag <role-name> in web.xml
              file.
              Please advise me.
              Thanks and Best Regards,
              Kwanjai
              

    difference          > between specification tag <role-name> and do not have
              > tag <role-name> in web.xml
              > file.
              <role-name> is usually used for security of a resource in a web application. This is generally used in conjunction with <security-role-ref> and <security-constraint> tag in the deployment descriptor.
              There are some docs on the BEA web-site on the same : http://e-docs.bea.com/wls/docs81/security/thin_client.html#1037337
              http://e-docs.bea.com/wls/docs81/webapp/weblogic_xml.html#1040908
              -Pankaj

  • XML element names required in lower case

    Hi,
    I am on release 4.6C
    I create an XML file from internal table using FM SDIXML_DATA_TO_DOM and SDIXML_DOM_TO_XML.
    The internal table is defined such that the  fieldnames of internal table are same as element names in XML file.
    The XML file gets created properly, but the element names appear in upper case.
    The requirement is to have it in lower case.
    Does anybody have any idea about how to control the case here?

    Hi Sudhir
    you can convert field names manually using translate command to convert it to lower case.
    hope this helps.

  • Refer to another element in xml schema

    Hello
    i havea very basic question.
    i am writing an xml schema. I'd like to ask that what should i do if i want to create an element which refers to another element within the same xml file.
    Regards,
    Beans

    <xs:schema>
    <xs:element name="A">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref="B"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="B"/>
    </xs:schema>

  • XML Document from XML Schema Bug

    When an XML document is generated from an XML Schema the XML document does not have all the elements specified in the XML Schema. The XML document only has the root element.
    1. Register an XML Schema.
    2. Create an XML document with File>New>General>XML>XML Document from XML Schema. The "Generate only Required Elements" is unchecked.
    3. The XML document has only the root element.
    In JDeveloper 10.1.3 all the elements in the XML Schema get generated.

    Also, the component palette for the XML document generated from the XML Schema does not list all the elements in the XML Schema, only the root element is listed. Even if elements are specified as required in the XML Schema with minOccurs="1" and the "Generate only Required Elements" checkbox is selected only the root element gets generated.

  • XML Schema binding - dynamic form

    I am new to Designer and XML. I have been given a basic interactive form and have persevered for a couple of (often frustrating) weeks to extend its functionality to link to an xml schema and provide for dynamic record creation. Unfortunately I am still having problems when adding new instances of subforms.<br /><br />I have a main form for reporting issues. Underneath it there are major components on a subform (can be multiple major components for each issue) and under major components are sub-components (can be multiple sub-components for each major component) on a child subform of major. I can add and delete instances of the subforms for both levels of records.<br /><br />I have created an xml schema based on the form since it already existed, and so the form fields have not inherited properties from the schema. However, I have bound the fields in the form to the xml fields through a data connection. The schema basically looks as follows (bot not literally the same as you will see from the tags):<br /><br /><element complextype issue><br />   <element issueId string/><br />   ...<br />   ...<br />   <element complextype majorcomponent unbounded><br />   <element majcomponentname string/><br />   ...<br />   <element complextype subcomponent unbounded><br />      <element subcomponent string/><br />      <element quantity string/><br />      ...<br />      ...<br />      </element><br />   </element><br /></element><br /><br />My problem is as follows: <br /><br />When I add an instance of a sub-component or major component subform, the first new instance appears to work correctly. However, every subsequent one inherits the values of the previous record and when it is changed, it changes the values of existing fields of the same name but of a different node. When I change each element in the xml schema to "unbounded", the forms appear to work properly but the values are then not nested correctly in the outputted xml data file (many records will appear under one sub-component, for example, when a new sub-component should be added for each).<br /><br />I suspected my problem might be that the "unbounded" property in the schema of the major component and sub-component elements are not linked to the Designer form because the major component and sub-component subforms are not bound to the xml schema. The reason they are not bound is because if I bind the subform, the first element, major/sub component name as applicable, loses its binding.<br /><br />I am sorry if this doesn't make any sense but I am hoping that someone might recognise the problem I am talking about as it is really creating much bother.<br /><br />Thanks.

    Thanks Justin for the reply. Unfortunately I can't explain exactly what was happening because I didn't keep sufficient notes and now the form is behaving differently. You are right in that when I bind the subform to the xml schema element, child fields do change their bindings from a full to a relative path. I had seen this before on all except the first field on a subform, which had losts any binding reference at all.
    I finally gave up on the schema and bound the forms to sample xml data. This fixed my problem. Now (several days later), I have revisited the problem and deleted my data connection to the xml file to connect to the schema once again. I am quite sure I have not changed the schema at all, nor the form, but for some reason it now appears to work correctly.
    I will continue to work with it, once again but thanks very much for your interest.

  • GUI built from  Xml schema

    I want to edit my Xml through the GUI .This GUI built from My Xml schema file .This is my requirement tell me how to achieve my requirement .you have any sample code please forward it to me .my platform is java .
    For example: NetBeans IDE provide the GUI for edit the web.xml file .
    Thanks in Advance ,
    With Regards,
    Ganesh kumar.L

    Also, the component palette for the XML document generated from the XML Schema does not list all the elements in the XML Schema, only the root element is listed. Even if elements are specified as required in the XML Schema with minOccurs="1" and the "Generate only Required Elements" checkbox is selected only the root element gets generated.

  • Case sensitive Tag names

    Hi friends
    I have  a question, is it  possible to transfer case sensitive tag names into xml structure ?  for exemple, I want to transfer    Tag name "DateCreated" .  I did a test but  start tag names is "DataCreated" and it is  Translated  in "DATACREATED" and this is a problem.
    Thanks
    Sergio

    Sergio,
    Usually what ever you have given in your xsd or message type you will have the same. So please check it. I just tested this and it seems to be the same as defined in your xsd or message type.
    Regards,
    ---Satish

  • Case insensitive user login

    Hi,
    I am working on a Weblogic portal application (Weblogic 10.3.2) to be deployed in a Weblogic Server 10.3.2. I want to enable case insensitive user name login for my application. Looks like by defaule user name goes for a case sensitive authentication. Is there any way to enable case insensitive authentication? Thanks.
    Regards,
    Ramakrishnan

    Hi
    By default Weblogic Login UserId is Case-InSensitive. For quick testing, open your Weblogic Console and say if your admin user id is "weblogic", just try any combination of this value like "WEBloGiC" with his password. It works and you should be able to login.
    NOW if you have any External LDAP configured, still you can login with your userid as Case InSensitive. BUT if you see that some Visitor Entilements or DAs stuff is not getting triggered or working properly, then you can do one setting. In your Weblogic Console, select your external AD Provider (like LDAP, AD etc) and click on the properties tab, where you set the host, port, userbase dn, groupbase dn etc. There you should see another property like a CheckBox named something like "Use Retrieved Username as Principal". What this means is if you say for example login as "RJegGA", the login will be successfull but the value that gets stored in the session in security subject value will be like "rjegga" where rjegga is the actual name coming from external LDAP.
    So point is, check the above check box and try again. For any users stored in the Default Weblogic Authenticator itself, it is case insensitive.
    Thanks
    Ravi Jegga

  • Case-Insensitive Servlet Headers

    Hi All,
    i have a problem with JDK 1.5 servlet package.
    i am getting case-insensitive header names when i call the request.getHeaderNames() method.
    When i send "Test" header name i am getting "test"
    is it a bug with this servlet version or is there a way to get case-sensitive headers??
    Please help.
    Thanks,

    I don't believe HTTP headers are case sensitive: look at [Message Headers in RFC 2616 (HTTP)|http://tools.ietf.org/html/rfc2616#page-31]. It says:
    Each header field consists of a name followed by a colon (":") and the field value. Field names are case-insensitive

  • XML Schema and .....

    Hi,
    I am working on SCORM project, in which i uses XML amd dom4j.
    I need to validate xml against XML Schema, I can do this if my XML refers to single XML Schema (.xsd) file, but my xml refers to multiple XMLSchema files. ???
    It the project i need to create xml elements as per XML Schema definitions.
    I also needs to get information about type, like type, possible value to allow user to edit element using UI.
    SO is there any to do this.

    The XML Schema is in XML. You can parse it and interperate it the way you want.

Maybe you are looking for

  • Can i transfer from ipod to computer until i get new ipod

    i have on older ipod, won't cut off, would like to save my 2700 songs to my computer before it crashes, can i save to my laptop and then transfer to new ipod?

  • How to use a function key on keyboard for executing a non SAP program

    Hello Gurus. My client want to run a non SAP program selecting the specific function key on keyboard during the entering data on SAP. i knew that it is possible to execute a non sap program after adding special program each by SAP program.  but, it i

  • Error While Creating Custom IDOC Segment using WE31

    Could anyone please help me resolve this issue. I am getting following error when trying to create a custom IDOC segment type using WE31. "Name range violation: Name Z1WOHDR not permitted in SAP system" Segment type trying to create: Z1WOHDR Regards

  • ORA- 31684 Object type already exists while import

    Hi All, I wrongly imported a user schema "AP_PD@SRV01" to user "A_IT@SRV02" (Instead of "AP_IT@SRV02"). User AP_IT and Tablespaces are already exists and used remap option while import. remap_schema=AP_PD:A_IT (instead of mapping to user AP_IT, I mis

  • Export values to listbox with the same format

    Dears, kindly i need some support please to solve this problem. I have a listbox that retrieve a data as per auto filter based on 3 criteria, but these data isn't retrieved with the same format, i retrieve these data from tow different tables, both o