XML-Type and reference to unavailable DTD causes validation problems

Hi,
I'm fairly new to Oracle's XML features. I've created a view that produces XML from a number of tables. The resulting XML is used to be stored on a web site for download by customers (this is a manual process about once a week via a CMS). It contains a reference to a DTD that is available on the web server, too. This XML must also be stored in the Oracle database. The problem is that the Oracle Server is not allowed to access any web site (Oracle server is in inhouse network with no access allowed to the world outside). So I can't store the XML in an XML-type column, as the Oracle server wants to validate the XML against the referenced DTD. There is an option not to validate the XML. But then I get the error when I try to access the XML afterwards. So up to now I use a CLOB column to store the XML, but then I lose all the benefits of an XML-type column. Is there any workaround?
TIA,
Stefan

In 10.2.0.2.0 The following works
SQL> drop table TEST_XML
  2  /
Table dropped.
SQL> create table TEST_XML (
  2     XML_SEQ number(10) not NULL,
  3     XML_DOC XMLType not NULL
  4  )
  5  /
Table created.
SQL> drop sequence TEST_XML_SEQ
  2  /
Sequence dropped.
SQL> create sequence TEST_XML_SEQ
  2  /
Sequence created.
SQL> create or replace view V_EMP_XML as select
  2         -- Processing Instruction
  3         '<?xml version="1.0" encoding="ISO-8859-1"?>' ||
  4         -- DTD reference
  5         '<!DOCTYPE employees SYSTEM "http://myserver/dtd/employees.dtd">' ||
  6         SYS.XMLTYPE.getClobVal(
  7            XMLElement("employees",
  8               (select XMLAgg(
  9                          XMLElement("emp",
10                             XMLAttributes(
11                                e.EMPNO as "empno",
12                                e.DEPTNO as "deptno"
13                             ),
14                             XMLElement("ename", e.ENAME),
15                             XMLElement("job", e.JOB),
16                             XMLElement("salary", e.SAL),
17                             XMLElement("hiredate", to_char(e.HIREDATE, 'YYYY-MM-DD'))
18                          )
19                       order by e.EMPNO
20                       )
21                from   SCOTT.EMP e
22               )
23            )
24         ) as XML_DOC
25  from   DUAL
26  /
View created.
SQL>
SQL> insert into TEST_XML
  2  (
  3    XML_SEQ,
  4    XML_DOC
  5  )
  6  select TEST_XML_SEQ.NEXTVAL,
  7         XMLType(v.XML_DOC, NULL, 1, 1)
  8  from   V_EMP_XML v
  9  /
1 row created.
SQL> select t.XML_DOC.getClobVal() as RESULT
  2  from   TEST_XML t
  3  where  t.XML_SEQ = 1
  4  /
RESULT
<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE employees SYSTEM "http://my
SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
  2  from   TEST_XML t
  3  where  t.XML_SEQ = 1
  4  /
ERROR:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00202: could not open "http://myserver/dtd/employees.dtd" (error 101)
Error at line 1
no rows selected
SQL> alter session set events ='31156 trace name context forever, level 2'
  2  /
Session altered.
SQL> select extract(t.XML_DOC, '//emp[@deptno=20]').getClobVal() as RESULT
  2  from   TEST_XML t
  3  where  t.XML_SEQ = 1
  4  /
RESULT
<emp empno="7369" deptno="20"><ename>SMITH</ename><job>CLERK</job><salary>800</s
SQL>

Similar Messages

  • Netwrok Profile,Network type and reference to a plant

    Whenever a network is created, we must assign it to a Network Profile, Network type and it should have a reference to a plant....what do you mean by this?

    Hi,
    In order to create a network, network profile and network type should be defined in advance.
    1. The network profile contains default values and parameters for controlling the processing of networks, such as control keys for activities.
    The data which you enter in the network profile is copied into the header, activities, and activity elements when you create a network.
    2. Every network you create must have a network type allocated to it.
    The network type determines:
    a) order category
    b) whether the network is used for planning
    c) default value for the settlement profile
    d) default value for a status profile, if you want to use the user status in status management
    e) allocation of the network type to a number range
    3. You enter more specific network type information (eg. default settlement rule, costing variant) <b>plant wise</b> in 'parameters for network type'.
    You may visit:
    http://help.sap.com/saphelp_47x200/helpdata/en/a9/8a853488601e33e10000009b38f83b/frameset.htm
    Regards

  • RFWT0010 withholding tax type and tax code change in vendor master problem

    Hi
    Due to some reasons I need to change the withholding tax type and tax code in vendor master.
    When i am running the report RFWT010,After changing the tax type and tax code in vendor master...the list contains no items. eventhough there are 14 line items for the vendor that are required to be adjusted with new tax type.
    Please suggest how to solve this query.
    regards
    yesap.fico

    Any inputs?

  • XML Type and ODP

    Hi,
    I have some problems with running application which uses ODP to connect to Oracle in version 9.2.0.6.
    There is one PLSQL packages with maybe 30 procedures. Half of this have VARCHAR2 input parameters.
    In that version of Oracle there is bug - I very ofen get "Numeric or value error" during calling PLSQL.
    Only one suggestion from Oracle is to upgrade into higher version. My Admin told me that upgrade is planned
    but he cannot provide date. So I am going to change my code from:
    PLSQL
    PROCEDURE Test1( param1 IN VARCHAR2
              ,param2 IN VARCHAR2
              ,param3 IN NUMBER
              ,param4 OUT CLOB)
    C#
    OracleCommand theCommand = new OracleCommand("package.Test1");
    theCommand.CommandType = CommandType.StoredProcedure;
    theCommand.Parameters.Add("param1", OracleDbType.Varchar2, value1, ParameterDirection.Input);
    theCommand.Parameters.Add("param2", OracleDbType.Varchar2, value2, ParameterDirection.Input);
    theCommand.Parameters.Add("param3", OracleDbType.Decimal, value3, ParameterDirection.Input);
    theCommand.Parameters.Add("param4", OracleDbType.clob, ParameterDirection.Output);
    INTO
    PLSQL
    --old procedure is not changed
    PROCEDURE Test1( param1 IN VARCHAR2
              ,param2 IN VARCHAR2
              ,param3 IN NUMBER
              ,param4 OUT CLOB)
    --new procedure added with XMLType input
    PROCEDURE Test1( params IN XMLType
              ,paramClob OUT CLOB)
    IS
    param_1 VARCHAR2(4000);
    param_2 VARCHAR2(4000);
    param_3 NUMBER;
    BEGIN
    SELECT ExtractValue( params, '/params/param1')
    ,ExtractValue( params, '/params/param2')
    ,ExtractValue( params, '/params/param3')
    INTO param_1, param_2, param_3
    FROM DUAL;
    --now calling old proc
    Test1(param_1, param_2, param_3, paramClob);
    END Test1;
    C#
    OracleCommand theCommand = new OracleCommand("package.Test1");
    theCommand.CommandType = CommandType.StoredProcedure;
         XDocument packedParams = new XDocument
    new XElement("params",
    new XElement("param1", value1),
    new XElement("param2", value2),
    new XElement("param3", value3)
    theCommand.Parameters.Add("params", OracleDbType.XMLType, packedParams , ParameterDirection.Input);
    theCommand.Parameters.Add("paramClob", OracleDbType.clob, ParameterDirection.Output);
    What do You think about such solution, do you have any bad experiences with using ODP/XMLType ?
    Regards,
    Piotr

    I doubt proposed change will reduce frequency of errors.
    "Numeric or value error"In V9 this error cause 2 possible causes.
    1) VARCHAR2 is too small
    2) non-numeric value being assigned to numeric datatype.
    If the root cause is #2 above, the error will continue with proposed change.
    Good Luck!

  • I am using the same Apple id for my iPhone and iPad! Does this cause a problem with apps?

    I Was told I should use a whole different I'd with my iPad because if I have both my phone and iPad with the same Apple id it will cause conflict with the apps on each of them. Does this happen?

    No. I've been using the same Apple ID on my iPhone and iPad for years without problems. If fact, if both devices are yours and you use both devices having the same Apple ID on each of them is preferable.

  • Upgrade to Lion and then to Mountain has caused me problems

    After upgrading to Lion a year ago or so I developed a problem on my MB Pro that I'd never had before. (1) My Mail app starting acting funny. I'd compose an email then click send, but it would sit in the Outbox--for hours, even days. I had to login to MobileMe to send mail and to get Mail. And (2),  my system would frequently crash. If I left 3-4 apps open and then went and had lunch, for example, when I came back, my system had crashed. The screen was blanked out, and I had to move the mouse, kind of use it like an eraser to erase a part of the crap in the foreground of the screen so that I could see my login, after which I would enter my password and then login. After login in I would find that all of my apps had either crased or were frozen. I thought it might be that I needed to upgrade my Memory, so I upgrade from 4 GB to 8 GB, but this didn't do any good.
    So...after Mountain Lion came out, I upgraded, hoping by some miracle this might solve the problem. But no, the problem persisted. I had AppleCare and so I called Apple three times about this problem, but they couldn't solve it either, although one senion tech adviser did manage to get my Mail app working again. He went to some folder (I wish I'd noted what this folder was at the time but I didn't), found there was sever gobbly-gook or junk files inside it, and then proceeded to delete them. After this my Mail app worked OK but the other problem persisted.
    A week ago I backed up everything on my MB Pro to my Time Machine BU, bought a new Mac Mini, and then used Migration Assistant to import all my data from the  Time Machine BU. I was hoping for a miracle--i.e., hoping that this problem would disappear. But not only has the problem not disappeared, I now can't even use my Mail app on the new Mac Mini. It is completely disabled...plus I still get the random crashes. I am getting by using my old MB Pro. I've transfered back to my MB Pro my essential files and I am using it while I try to figure out what in the **** is going on with the original data on my Mac Mini.
    Any ideas would be much appreciated.

    Install or Reinstall Lion/Mountain Lion from Scratch
    Be sure you backup your files to an external drive or second internal drive because the following procedure will remove everything from the hard drive.
    Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Erase the hard drive:
      1. Select Disk Utility from the main menu and click on the Continue button.
      2. After DU loads select your startup volume (usually Macintosh HD) from the left side list. Click on
          the Erase tab in the DU main window.
      3. Set the format type to Mac OS Extended (Journaled.) Optionally, click on the Security button and set the Zero
            Data option to one-pass. Click on the Erase button and wait until the process has completed.
      4. Quit DU and return to the main menu.
    Reinstall Lion: Select Reinstall Lion/Mountain Lion and click on the Install button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • XML SAX dtd Validation Problem

    Hi,
              I’m having problems getting an xml document to validate within Weblogic 8.1. I am trying to parse a document that references both a dtd and xsd. Both the schema and dtd reference need to be substituted so they use local paths. I specify the schema the parser should use and have created an entityResolver to change the dtd reference.
              When this runs as a standalone app from eclipse the file parses and validates without a problem. When deployed to the app server the process seems to be unable read the contents of the dtd. Its not that it cannot find the file (no FileNotFoundException is thrown but this can be created if I delete the dtd) rather it seems to find no declared elements.
              Initial thought was that the code didn’t have access to read the dtd from its location on disk, to check I moved the dtd to within the deployed war and reference as a resource. The problem still persists.
              Code Snippet:
              boolean isValid = false;
              try {
              // Create and configure factory
              SAXParserFactory factory = SAXParserFactoryImpl.newInstance();
              factory.setValidating(true);
              factory.setNamespaceAware(true);
              // To be notified of validation errors in the XML document,
              // add a custom error handler to the document builder
              PIMSFeedFileValidationHandler handler
              = new PIMSFeedFileValidationHandler();
              // Create and Configure Parser
              SAXParser parser = factory.newSAXParser();
              parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              parser.setProperty(NAMESPACE_PROPERTY_KEY, getSchemaFilePath());
              // Set reader with entityResolver for dtd
              XMLReader xmlReader = parser.getXMLReader();
              xmlReader.setEntityResolver(new SAXEntityResolver(this.dtdPath));
              // convert file to URL, as it is a remote file
              URL url = super.getFile().toURL();
              // Open an input stream and parse
              InputStream is = url.openStream();
              xmlReader.setErrorHandler(handler);
              xmlReader.parse(new InputSource(is));
              is.close();
              // get the result of parsing the document by checking the
              // errorhandler's isValid property
              isValid = handler.isValid();
              if (!isValid) {
              LOGGER.warn(handler.getMessage());
              LOGGER.debug("XML file is valid XML? " + isValid);
              } catch (ParserConfigurationException e) {
              LOGGER.error("Error parsing file", e);
              } catch (SAXException e) {
              LOGGER.error("Error parsing file", e);
              } catch (IOException e) {
              throw new FeedException(e);
              return isValid;
              See stack trace below for a little more info.
              2005-01-28 10:24:09,217 [DEBUG] [file] - Attempting validation of file 'cw501205.wa1.xml' with schema at 'C:/pims-feeds/hansard/schema/hansard-v1-9.xsd'
              2005-01-28 10:24:09,217 [DEBUG] [file] - Entity Resolver is using DTD path file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/
              VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
              2005-01-28 10:24:09,227 [DEBUG] [file] - Creating InputSource at: file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
              2005-01-28 10:24:09,718 [WARN ] [file] - org.xml.sax.SAXParseException: Element type "Hansard" must be declared.
              org.xml.sax.SAXParseException: Element type "Session" must be declared.
              org.xml.sax.SAXParseException: Element type "DailyRecord" must be declared.
              org.xml.sax.SAXParseException: Element type "Volume" must be declared.
              org.xml.sax.SAXParseException: Element type "Written" must be declared.
              org.xml.sax.SAXParseException: Element type "WrittenHeading" must be declared.
              org.xml.sax.SAXParseException: Element type "Introduction" must be declared.
              … continues for all the elements in the doc
              2005-01-28 10:24:10,519 [DEBUG] [file] - XML file is valid XML? false
              2005-01-28 10:24:10,519 [WARN ] [file] - Daily Part file 'cw501205.wa1.xml' was not valid XML and was not processed.
              Has anybody seen this behavior before with weblogic and if so how have you resolved the issue.
              Thanks in Advance
              Adam

    It looks like you clicked on "Post" before you got around to explaining your problem. I don't see any error messages or any description of what was supposed to happen and what happened instead.
    Now, I don't know anything about XML Schema, but just guessing at how that unique name feature might be designed, and just guessing that your unique name is actually in the <userId> element, I would suggest that this:
    <xsd:unique name="un_name"> 
      <xsd:selector xpath="USER"/> 
      <xsd:field xpath="."/> 
    </xsd:unique> is at fault because it doesn't mention the <userId> element anywhere.

  • Mixing ESR Data type and XSD Objects

    Dear PI forum users,
    I have created some XSD containing complex types and thus "acting" as data types.
    I would like to use such a complex type defined in XSD in an ESR Data type object.
    But when I use the search help in the type column, i can only see other data types objects and not complex types defined in External definition objects.
    Do you know if what I want to do is possible and how ?
    Thanks a lot.
    Jean-Charles

    Hi,
    i can only see other data types objects and not complex types defined in External definition objects.
    This is because only datatypes are shown in the search help. It is not possible to reference an external definition in a data type.
    What you can do is:
    1.) Recreate the complex types found your external definition as a data type, and reference it in your main data type
    or
    2.) Encode the data types into your external definition (cleaner)
    Hope this helps,

  • SAX Parser XML Validation Problems

    Hi,
    I’m having problems getting an xml document to validate within Weblogic 8.1. I am trying to parse a document that references both a dtd and xsd. Both the schema and dtd reference need to be substituted so they use local paths. I specify the schema the parser should use and have created an entityResolver to change the dtd reference.
    When this runs as a standalone app from eclipse the file parses and validates without a problem. When deployed to the app server the process seems to be unable read the contents of the dtd. Its not that it cannot find the file (no FileNotFoundException is thrown but this can be created if I delete the dtd) rather it seems to find no declared elements.
    Initial thought was that the code didn’t have access to read the dtd from its location on disk, to check I moved the dtd to within the deployed war and reference as a resource. The problem still persists.
    Code Snippet:
    boolean isValid = false;
    try {
         // Create and configure factory
    SAXParserFactory factory = SAXParserFactoryImpl.newInstance();
    factory.setValidating(true);
    factory.setNamespaceAware(true);
    // To be notified of validation errors in the XML document,
    // add a custom error handler to the document builder
    PIMSFeedFileValidationHandler handler
    = new PIMSFeedFileValidationHandler();
         // Create and Configure Parser
    SAXParser parser = factory.newSAXParser();
    parser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
    parser.setProperty(NAMESPACE_PROPERTY_KEY, getSchemaFilePath());
         // Set reader with entityResolver for dtd
    XMLReader xmlReader = parser.getXMLReader();
    xmlReader.setEntityResolver(new SAXEntityResolver(this.dtdPath));
    // convert file to URL, as it is a remote file
    URL url = super.getFile().toURL();
    // Open an input stream and parse
    InputStream is = url.openStream();
    xmlReader.setErrorHandler(handler);
    xmlReader.parse(new InputSource(is));
    is.close();
    // get the result of parsing the document by checking the
    // errorhandler's isValid property
    isValid = handler.isValid();
    if (!isValid) {
    LOGGER.warn(handler.getMessage());
    LOGGER.debug("XML file is valid XML? " + isValid);
    } catch (ParserConfigurationException e) {
    LOGGER.error("Error parsing file", e);
    } catch (SAXException e) {
    LOGGER.error("Error parsing file", e);
    } catch (IOException e) {
    throw new FeedException(e);
    return isValid;
    See stack trace below for a little more info.
    2005-01-28 10:24:09,217 [DEBUG] [file] - Attempting validation of file 'cw501205.wa1.xml' with schema at 'C:/pims-feeds/hansard/schema/hansard-v1-9.xsd'
    2005-01-28 10:24:09,217 [DEBUG] [file] - Entity Resolver is using DTD path file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/
    VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
    2005-01-28 10:24:09,227 [DEBUG] [file] - Creating InputSource at: file:C:/Vignette/runtime_services/8.1/install/common/nodemanager/VgnVCMServer/stage/pims-hansard/pims-hansard.war/WEB-INF/classes/com/morse/pims/cms/feed/sax/ISO-Entities.dtd
    2005-01-28 10:24:09,718 [WARN ] [file] - org.xml.sax.SAXParseException: Element type "Hansard" must be declared.
    org.xml.sax.SAXParseException: Element type "Session" must be declared.
    org.xml.sax.SAXParseException: Element type "DailyRecord" must be declared.
    org.xml.sax.SAXParseException: Element type "Volume" must be declared.
    org.xml.sax.SAXParseException: Element type "Written" must be declared.
    org.xml.sax.SAXParseException: Element type "WrittenHeading" must be declared.
    org.xml.sax.SAXParseException: Element type "Introduction" must be declared.
    … continues for all the elements in the doc
    2005-01-28 10:24:10,519 [DEBUG] [file] - XML file is valid XML? false
    2005-01-28 10:24:10,519 [WARN ] [file] - Daily Part file 'cw501205.wa1.xml' was not valid XML and was not processed.
    Has anybody seen this behavior before with weblogic and if so how have you resolved the issue.
    Thanks in Advance
    Adam

    Hi David,
    I have checked the ejb-jar.xml file and there is no duplicate values in it and the other things is that the same application is been deployed on OAS 10G and websphere and its working fine. In the forum someone has replied to a similar problem that there is bug in Weblogic 10.3 and its CR no 376292. I am not sure about it, does anyone any information about it.
    Thanks and Regards
    Deepak Dani

  • Oracle Object Types and XML

    Hi All
    I have oracle object types created.
    <code>
    CREATE OR REPLACE
    TYPE CONFIRM_APP_CONFIRM_ENQUIRY_AT AS OBJECT
    ENQATTRIBTYPECODE VARCHAR2(1000),
    ENQATTRIBVALUECODE VARCHAR2(1000),
    ENQATTRIBSTRINGVALUE VARCHAR2(1000),
    ENQATTRIBNUMVALUE NUMBER,
    ENQATTRIBDATEVALUE DATE
    </code>
    I m using this type for couple of columns in a table
    and then i try to use this procedure which generates XML
    <code>
    BEGIN
    MY_SQL :=
    DBMS_XMLQUERY.NEWCONTEXT
    ( 'Select Nvl(Enquiry_Number,9999) "EnquiryNumber",
    External_System_Reference "ExternalSystemReference",
    External_System_Number "ExternalSystemNumber",
    Service_Code "ServiceCode",
    Subject_Code "SubjectCode",
    Enquiry_Description "EnquiryDescription",
    Enquiry_Location "EnquiryLocation",
    Enquiry_Status_Code "EnquiryStatusCode",
    Assigned_Office_Code "AssignedOfficerCode",
    Logged_Time "LoggedTime",
    EnquiryX "EnquiryX",
    EnquiryY "EnquiryY",
    Site_Code "SiteCode",
    Central_Asset_Id "CentralAssetId",
    Contact_Name "ContactName",
    Contact_Phone "ContactPhone",
    Contact_Fax "ContactFax",
    Contact_Email "ContactEmail",
    Enquiry_Reference "EnquiryReference",
    Enquiry_Class_Code "EnquiryClassCode",
    Notice_From_Org_Code "NoticeFromOrgCode",
    Works_Reference "WorksReference",
    Job_Number "JobNumber",
    Address_Reference "AddressReference",
    enquiry_attribute1 "EnquiryAttribute",
    enquiry_attribute2 "EnquiryAttribute",
    enquiry_attribute3 "EnquiryAttribute",
    enquiry_attribute4 "EnquiryAttribute",
    enquiry_attribute5 "EnquiryAttribute",
    enquiry_attribute6 "EnquiryAttribute",
    enquiry_attribute7 "EnquiryAttribute",
    enquiry_attribute8 "EnquiryAttribute",
    enquiry_attribute9 "EnquiryAttribute",
    enquiry_attribute10 "EnquiryAttribute",
    enquiry_attribute11 "EnquiryAttribute",
    enquiry_attribute12 "EnquiryAttribute",
    enquiry_attribute13 "EnquiryAttribute",
    enquiry_attribute14 "EnquiryAttribute",
    enquiry_attribute15 "EnquiryAttribute",
    enquiry_attribute16 "EnquiryAttribute",
    enquiry_attribute17 "EnquiryAttribute",
    enquiry_attribute18 "EnquiryAttribute",
    enquiry_attribute19 "EnquiryAttribute",
    enquiry_attribute20 "EnquiryAttribute",
    enquiry_customer "EnquiryCustomer",
    enquiry_document "DocumentLink"
    FROM XXHCC_HOLDING_CONFIRM WHERE
    EXTERNAL_SYSTEM_REFERENCE ='
    || EXTERNAL_SYSTEM_REFERENCE
    || '
    AND message_status = ''FAIL'''
    DBMS_XMLQUERY.SETROWSETTAG (MY_SQL, 'Operation');
    DBMS_XMLQUERY.SETROWTAG (MY_SQL, 'NewEnquiry');
    L_XML := DBMS_XMLQUERY.GETXML (MY_SQL);
    DBMS_XMLQUERY.CLOSECONTEXT (MY_SQL);
    </code>
    when i get the xml as output, i get this..
    <code>
    <Operation>
    <NewEnquiry num="1">
    <EnquiryNumber>9999</EnquiryNumber>
    <ExternalSystemReference>4343017</ExternalSystemReference>
    <ExternalSystemNumber>1</ExternalSystemNumber>
    <ServiceCode>HWAY</ServiceCode>
    <SubjectCode>MAIN</SubjectCode>
    <EnquiryDescription>TAI-Highway Maintenance</EnquiryDescription>
    <EnquiryLocation>O/S Cheese Pub</EnquiryLocation>
    <LoggedTime>2008-04-09T08:33:36</LoggedTime>
    <SiteCode>19101890</SiteCode>
    <ContactName>MRS xyz</ContactName>
    <ContactPhone>3434343</ContactPhone>
    <EnquiryReference>CRMHUB</EnquiryReference>
    <NoticeFromOrgCode>ABC</NoticeFromOrgCode>
    <WorksReference>4343017</WorksReference>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSPL</ENQATTRIBTYPECODE> <ENQATTRIBSTRINGVALUE>n.a</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSAI</ENQATTRIBTYPECODE>
    <ENQATTRIBSTRINGVALUE>Cracked Path-Loose Flagstone</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute> <ENQATTRIBTYPECODE>CSDL</ENQATTRIBTYPECODE> <ENQATTRIBSTRINGVALUE>No</ENQATTRIBSTRINGVALUE>
    </EnquiryAttribute>
    <EnquiryAttribute>
    <ENQATTRIBTYPECODE>CSIM</ENQATTRIBTYPECODE>
    </EnquiryAttribute>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <EnquiryAttribute/>
    <ENQUIRY_CUSTOMER>
    <CUSTOMER_ALT_PHONE>00</CUSTOMER_ALT_PHONE>
    <CUSTOMER_PRIMARY_ADDRESS>,,0, ABC Street</CUSTOMER_PRIMARY_ADDRESS>
    <CUSTOMER_TOWN_NAME>UK</CUSTOMER_TOWN_NAME>
    <CUSTOMER_COUNTY_NAME>UK</CUSTOMER_COUNTY_NAME>
    <CUSTOMER_POST_CODE>AB1 3QT</CUSTOMER_POST_CODE>
    </ENQUIRY_CUSTOMER>
    </NewEnquiry>
    </Operation>
    </code>
    My question is i m transferring this XML to a third party webservice and it does inserting into a third party application.
    The problem is if you look under EnquiryAttribute tag ENQATTRIBSTRINGVALUE and ENQATTRIBTYPECODE i need this to be in lowercase.
    As the xml is getting automatically generated how do i achieve this. I feel them in the uppercase is causing problems at the other end.
    Any help appreciated
    Srini
    Message was edited by:
    sikhasrinivas

    Use "..." delimiters in the CREATE TYPE (and in all your code that references the type).

  • Writting a XML file from a DOM with the reference to a DTD

    Hi everyone,
    how can I write a XML file, that has a reference to a DTD like:
    <!DOCTYPE testdoc SYSTEM "testdoc.dtd">
    I have a DOM that contains my XML-Data and I want to have this line in the XML File. I'm using a Transformer to write this XML stuff in the file.
    Does anyone has an idea?
    Thanks in advance
    Andi

    http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/OutputKeys.html
    transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "testdoc.dtd");

  • How to paste DTD in XML file. (not reference to .dtd file)

    Hello!
    I create XML file using DOM. How can I create DTD on the top of the file?
    I need the DTD, not a reference to it. So the next method won't work.
    transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, "Resources\\Settings\\projectFile.dtd") since it is paste a reference to .dtd file. It means that if user moves XML file to other place he need to move .dtd file also, and I don't want this method. I want paste next DTD
    <!DOCTYPE project [
                        <!ELEMENT project (component*) >
                        <!ELEMENT component ANY >
                        <!ATTLIST component id  ID  #REQUIRED >
    ]>from the .dtd file on the top of my XML file. How can I do this?
    Thank you.

    I've found that by opening a inputstream to the XML file and wrapping it to filter the DTD out altogether and passing that inputstream to JAXB does the trick.
    this seems actually faster, since it doesn't go off on the net to look for the dtd!
    is this not catered for already somewhere??
    thanks,

  • XML Schemas and "Type"

    I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one:
    According to Eclipse, I'm not allowed to put an element with a type if it also has a restriction, because the restriction seems to (as far as I can tell) automatially attach an "anonymous type" to the element. That is to say:
    <element name="foo" type="string">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>doesn't work. It also doesn't work if I don't have a "base='x'" line, but that makes a bit more sense. On the other hand:
    <element name="foo">
        <simpleType>
            <restriction base="string">
                [restriction tags]
            </restriction>
        </simpleType>
    </element>
    does work, but causes a number of problems because "foo" no longer has a type to call its own. I'm sure I'm missing something here but I can't work out what.
    Here's the exact error from Eclipse's XML Schema Validator, which places an error on foo's declaration line:
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element.
    - Element type "element" must either be followed by attribute types, '>' or '/>'."
    Any help would be appreciated, thanks. :)

    As the message below indicates you are defining a new simple type but in line with the element definition (enclosed by element tags). As it is in-line it is classed as an anonymous type i.e. has no name. You therefore cannot give an element a type and then specify its type in line.
    Athough essentially it is a string (hence requires base type) it is nontheless a new type i.e a string with restrictions. The other way to do this, which will allow you to reuse the type is is as follows
        <xsd:element name="foo" type="myRestrictedString"/>
        <xsd:element name="foo2" type="myRestrictedString"/>
        <xsd:simpleType name="myRestrictedString">
            <xsd:restriction base="xsd:string">
                <xsd:pattern value="[0-9]{3}"/>
            </xsd:restriction>
        </xsd:simpleType>
    >
    "Multiple Annotations found on this line:
    - src-element.3: Element 'foo' has both a 'type'
    attribute and a 'anonymous type' child. Only one of
    these is allowed for an element.
    - Element type "element" must either be followed by
    attribute types, '>' or '/>'."

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • I Cannot Print From Photoshop CC, Performance is SLOW and TYPE causes a problems.

    Hi!
    To start, I have noticed HUGE bugs with Photoshop CC on multiple levels on different computers with different setups.
    Computer one
    Print Issues:  I am getting this error message "The saved printer information is not compatible with this version of photoshop, or the saved printer is no longer available. You will need to check your printer settings before printing" and "The saved print information is an incompatible version. It has been set to default values.". I have tried deleting the pref file, updating the printer driver, checking print logs and computer updates. All are up to date and running well. When I hit print, the dialog box comes up but will not allow me to change ANYTHING. So I can only print on an 8.5x11. However if i go into the actual printer preferences and change the default settings there, then go to photoshop and print it will allow me to the size I set the defaults at. I can print from any other program without an issue and I did not have any such problems with CS6. What other causes could be the cause of this and what are your suggestions to fix this? It seems to be a Photoshop bug, which is what I have been reading a lot of.  I work off a Dell, windows 8.1 64bit. I would LOVE to downgrade to CS6 but cannot once I upgraded to CC. I did not have this problem when I first upgraded and for a few weeks after.
    Performance and Font Issues: This seems(ed) to go hand and hand. But also performance happens more sporadically for some odd reason. The CPU usage and MEMORY went to 100% and photoshop was using 1,860.2 sometimes spiking to 4,000 MB of memory.  I searched all the forums and found that my photoshop was not liking a specific font. I removed the font and things started moving faster. Then a few minutes later, it started to lag again with the same type of CPU and MEMORY spike. I then did more research and found that turning off the font preview has helped, so I turned off that. Photoshop started to work A LOT faster, no lag and seemed to function correctly. The 2 weeks ago, I started to experience the lag again (but without the CPU and MEMORY spike) and with only opening certain files to which none had any fonts that Adobe has said doesn't work with photoshop. I then researched again and found that again, the fonts preview when hoovering over the fonts and having the fonts change in the document was giving issues. Alass...there was my issue, again with the fonts. I then did all the research and did what the forums said such as, try using a brand new doc and create a file with out any of the fonts in the old doc to cause conflicts. NOPE. I was having issues in the new doc and getting this error "Could not complete your request because of program error" then photoshop would lock up because of CPU and MEMORY spike.
    Computer two:
    Same issue as computer one's Performance and Font Issues.
    Now, I am no programmer nor do I understand that complexity of what goes in to create these programs, but EVERY ADOBE forum I have read will not admit it's a font issue or that there is a problem with the fonts, BUT my WEEKS of issues and research all keep coming back to FONTS when dealing with performance issues. So how can we get a fix on the fonts issue asap as my team nor I cannot work in the current photoshop because of performance issues?
    A quick response would be much appreciated!
    Thank you much!
    UPDATE: I received a phone call from ADOBE and they said to me that they could send me a CS6 version that i wouldn't have to pay for and would also "Solve My Problem". I said, no thank you being that I have the CC and have access to ALL the programs, so that actually doesn't solve my problem or the overall problem of the CC program. So they escalated my problem and will have someone else respond to me as soon as possible.
    Message was edited by: Boh Phillips at 2:38 pm

    Quite frankly that’s too much text for me to read in one post … (edit: So consider this more of a bump of the thread than an actual attempt at helping.)
    What have you done for trouble-shooting so far?
    Troubleshoot fonts | Photoshop CC 2014, CC, CS6, CS5
    http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
    Optimize performance | Photoshop CS4, CS5, CS6, CC

Maybe you are looking for