ExtractValue

How can i do things like this:
select ExtractValue(XMLType('<t>
                                <t1>t1</t1>
                                <t2>t2</t2>
                             </t>'),'t')
  from dualFrom that select statement i want to get something like this:
<t>
   <t1>t1</t1>
   <t2>t2</t2>
</t>And i whant to use ExtractValue because it convert escape character well.
How to select all this ?

The definition of extractValue*( is that it produces a SQL Scalar type from an XML Scalar node (text() or attributeValue). It cannot be used to generate XML from XML....
Also the XML spec states that certain characters must be escaped in order for the document to be valid XML, so if you unescape these characters you no longer have valid XML..
You may be able to do what you want by using XMLSERIALIZE or EXTRACT() to covert your XML to a VARCHAR2 or CLOB and then DBMS_XMLGEN.CONVERT to do the unescaping but what you end up with will be a CLOB containing an invalid XML Serialization.

Similar Messages

  • XML extractvalue and NULL result-Problem

    I've got a very strange problem: One select gets restults in my development-database, the same select in production retrieves NULL.
    The following sql-construct:
    SELECT (
      CASE
        WHEN personkey!=-1
        THEN
          ( SELECT extractvalue( v.xml, '/p:PersonData/p:TypedPostalAddress[@id="' ||<string> || '"]/p:PostalAddress/p:PostalCode', .....')
          FROM <tbl1>,<tbl2>
          WHERE tbl1.id=tbl2.id)
        ELSE
          ( SELECT 'no person' FROM dual )
      END ) adress,
    FROM <tbl3>
    WHERE <tbl3>.personkey!=-1
    When I use a view containing an outer join in the ELSE-Condition of the case I'm not getting a result in production, but I do in development (same data, same oracle-version, but other instance), but when I use a view without an outer join in the else-Condition, I'm getting results also in production. The column "personkey" is not nullable.
    Does anyone got an idea what could be wrong with this SQL?
    Thanks in advance for help!

    Additional Information:
    When resolving the CASE to a "union all" query, I am having the following result:
    query1 is working
    query2 is working
    joining both queries with union all => the result of the first query (with the extractvalue) is NULL, the second query is still working.

  • Select / extractValue and Datatype

    Database: Oracle 9.2.0.1.0
    I am selecting from "XML Schema Validating" data stored in column of XMLTYPE datatype.
    SELECT
    extractvalue(value(t), '/path1/element1') DateVal1,
    extractvalue(value(t), '/path1/element2/@attribute') Date2
    FROM XML_TABLE A,
    TABLE (
    xmlsequence (extract(A.XML_COLUMN,'path0/path1'))) t;
    Returned values DateVal1, Date2 are strings and not of date datatype. Registered schema for the above element and attribute is of date datatype. How can I retain datatype in my select statement?
    Any additional input will be appreciated.

    Please see thread at
    any relationship between extractvalue's return type and sqltype?

  • Problem in UPDATE with EXTRACTVALUE : ORA-00600

    Hi all,
    I have some trouble with this update query :
    UPDATE enveloppe_message
       SET ems_date_modification = SYSDATE,
           ems_login_modification = 'pipo',
           ems_dn_emet = EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/Sender/DN', 'xmlns="urn:swift:saa:xsd:saa.2.0"'),
           ems_dn_dest = EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/Receiver/DN', 'xmlns="urn:swift:saa:xsd:saa.2.0"'),
           ems_reference_tech = EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/SenderReference', 'xmlns="urn:swift:saa:xsd:saa.2.0"')
    WHERE ems_id = 1130;I get this error message :
    ORA-00600: code d'erreur interne, arguments : [koklismem111: BFILE locator], [], [], [], [], [], [], [], [], [], [], []But if I do this :
    SELECT EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/Sender/DN', 'xmlns="urn:swift:saa:xsd:saa.2.0"') AS a,
           EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/Receiver/DN', 'xmlns="urn:swift:saa:xsd:saa.2.0"') AS b,
           EXTRACTVALUE (ems_xml, '/DataPDU/Header/Message/SenderReference', 'xmlns="urn:swift:saa:xsd:saa.2.0"') AS c
      FROM enveloppe_message
    WHERE ems_id = 1130;It's ok and I get these datas :
    a : ou=abc,ou=ghf,o=bvhdjdie,o=lkljg
    b : ou=dfg,ou=fkd,o=nbjfkkdk,o=bnfjd
    c : jkldfjsdlflsnvkllkfkfllcklqsjkckldand thus, this query become ok ????
    UPDATE enveloppe_message
       SET ems_date_modification = SYSDATE,
           ems_login_modification = 'pipo',
           ems_dn_emet = 'ou=abc,ou=ghf,o=bvhdjdie,o=lkljg',
           ems_dn_dest = 'ou=dfg,ou=fkd,o=nbjfkkdk,o=bnfjd',
           ems_reference_tech = 'jkldfjsdlflsnvkllkfkfllcklqsjkckld'
    WHERE ems_id = 1130;Does anyone have some idea ????
    Thanks.

    Thanks a lot Marco for the link on the FAQ.
    But I don't understand how to use a non default namespace... sorry!
    Finally, this query is okay :
    SELECT xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/Sender/DN' passing ems_xml as "p" returning content) as varchar2(4000)) AS a,
           xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/Receiver/DN' passing ems_xml as "p" returning content) as varchar2(4000)) AS b,
           xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/SenderReference' passing ems_xml as "p" returning content) as varchar2(4000)) AS c
      FROM enveloppe_message
    WHERE ems_id = 1130;But this one, not !
    UPDATE enveloppe_message
       SET ems_date_modification = SYSDATE,
           ems_login_modification = 'pipo',
           ems_dn_emet = xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/Sender/DN' passing ems_xml as "p" returning content) as varchar2(4000)),
           ems_dn_dest = xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/Receiver/DN' passing ems_xml as "p" returning content) as varchar2(4000)),
           ems_reference_tech = xmlcast(xmlquery('declare default element namespace "urn:swift:saa:xsd:saa.2.0"; $p/DataPDU/Header/Message/SenderReference' passing ems_xml as "p" returning content) as varchar2(4000))
    WHERE ems_id = 1130;I get the same error :
    ORA-00600: code d'erreur interne, arguments : [koklismem2: insufficient locator len], [0], [86], [], [], [], [], [], [], [], [], []Maybe these optimizations don't solve my initial problem !?

  • OracleDataReader allocation using extractvalue() on XMLType column

    I am accessing an element within an XMLType column in a select statement using the extractvalue SQL function.
    Select ExtractValue(column_name,'//Text') from table_name
    I noticed that the RowSize for the command used to execute the select is unusually large (~24K). I have narrowed the space allocation issue down to the extractvalue() column, which is about 8k per instance of extractvalue() in the select statement. Since the fetch size if 64K, I am seeing a lot of calls to opsDacRead (DB round trips?) in the ODP.NET log, probably due to the fact that only 3 rows are being returned in each call to opsDacRead.
    My question is: How does ODP.NET determine the amount of space allocated within the reader's buffer for such a column? The element I am trying to extract is defined in the xml schema as 'xs:string' and is never more than 40 characters or so.

    Mark,
    Thanks for the response.
    Yes, I tried increasing FetchSize. Unfortunately, under heavy load, I experienced long execution/wait times within the first and last calls to opsDacRead() while walking the reader. I suspect that was due to allocation and clean-up.
    However, I did find out why the buffer size was so large. If the xml schema does not contain length restrictions on string/text elements via the maxLength option, Oracle defines the underlying field in the data type created for the schema as VARCHAR2(4000).
    I'm pretty sure that adding a maxLength restriction to the string element in the xml schema will reduce the size of the data type's field and in turn reduce the size of the Reader's buffer, but I haven't had a chance to test it.
    Thanks again,
    -Jeff

  • Which is better:  extractValue or existsNode for Performance

    Hi,
    We have XMLDB Table with only 1 Column (XMLType) created using below:
    create table TNMAB_AGREEMENT_XML( AGREEMENT_XML XMLType )
         XMLTYPE COLUMN AGREEMENT_XML XMLSCHEMA "ABQuote_V1.xsd" ELEMENT "Quote"
              VARRAY AGREEMENT_XML.XMLDATA."SHIPPING_PARTIES"
                   STORE AS TABLE SHIPPING_PARTIES_NT
                   ((PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX) ENABLE))
              VARRAY AGREEMENT_XML.XMLDATA."SALES_OFFICE_CODES"."STRING_WRAPPERS"
                   STORE AS TABLE SALES_OFFICE_CODES_NT
              ((PRIMARY KEY (NESTED_TABLE_ID, ARRAY_INDEX) ENABLE))
         TABLESPACE RGM_ME_DATA;
    alter table TNMAB_AGREEMENT_XML
    add constraint TNM_AGREEMENT_XML_PK primary key (AGREEMENT_XML.XMLDATA."AGREEMENT_ID",
                                  AGREEMENT_XML.XMLDATA."AGREEMENT_VERSION")
    using index tablespace RGM_ME_INDX;
    We populated around 500K rows and have been seeing some Performance Issues
    in accessing data from above Table, at times.
    What is difference between extractValue and existsNode in terms of performance?
    Here are sample queries:
    SELECT extract(AGREEMENT_XML, '/') "Quote" FROM TNMAB_AGREEMENT_XML WHERE extractValue(AGREEMENT_XML, '/Quote/Identifier') = ‘00003554’
    SELECT extract(AGREEMENT_XML, '/') "Quote" FROM TNMAB_AGREEMENT_XML WHERE existsNode(AGREEMENT_XML, '/Quote[Identifier = "00003554"]') = 1
    Which of the above would be better to use existsNode or extractValue.
    In above case, both the queries are expected to return Single Row (searched
    using Quote Identifier, which is defined as PK of Table) and query explain plan does
    show usage of PK for above queries.
    Thanks
    user641521

    In theory existsNode can be slightly better, however in you cases the two queries are not identical.
    Also there are a number of other issues with your query..
    1. extract(AGREEMENT_XML, '/') is not required. You should just have the AGREEMENT_XML column. Extract is only need when extracting a fragment from the XML. Since you are returning the entire document the use of extract(column,'/') is redundant, but can cause performance issues..
    THis query should be written as
    SELECT AGREEMENT_XML "Quote"
    FROM TNMAB_AGREEMENT_XML
    WHERE extractValue(AGREEMENT_XML, '/Quote/Identifier') = ‘00003554’
    and can be written using existsNode as
    SELECT AGREEMENT_XML "Quote"
    FROM TNMAB_AGREEMENT_XML
    WHERE existsNode(AGREEMENT_XML, '/Quote[Identifier="00003554"]') = 1
    Assuming Identifier can only occur once inside Quote. If Identifier can occur multiple times inside Quote then the existsNode version would still work while the extractValue version would return errors

  • Select extractValue returns nothing - HELP!

    My xml document in my XMLType table looks like this:
    <echoems:ECHOMetrics xmlns:echoems="http://(myhost)/(myfilename.xsd)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://(myhost)/(myfilename.xsd) http://(myhost)/(myfilename.xsd)">
    <OrderMetrics>
    <OrderItemMetric>
    <submissionDateTime>2001-12-31T12:00:00.000000</submissionDateTime>
    <requestor>123.456.789.000</requestor>
    <product>MYD09Q1</product>
    </OrderItemMetric>
    </OrderMetrics>
    </echoems:ECHOMetrics>
    My query is:
    select extractValue(object_value, '/ECHOMetrics/OrderMetrics/OrderItemMetric/product') from echoxml;
    However, I keep getting an emtpy result. What am I doing wrong?

    One other question. I've searched the forum on XMLTable and can't find what I'm looking for. Using my xml file below, how can I use XMLTable to get the data and column names into a relation table or view? I've tried the following but get no rows returned:
    SELECT echo2."product"
    FROM echoxml,
    XMLTABLE('/ECHOMetrics'
    PASSING extract(object_value,'echoems:ECHOMetrics/OrderMetrics/OrderItemMetric/*','xmlns:echoems="http://(myhost)/emslogsDEV/error/(myfilename.xsd)')
    COLUMNS
    "product" varchar2(85) PATH '/ECHOMetrics/OrderMetrics/OrderItemMetric/product')
    echo2;
    Here's my document:
    <echoems:ECHOMetrics xmlns:echoems="http://(myhost)/(myfilename.xsd)" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://(myhost)/(myfilename.xsd) http://(myhost)/(myfilename.xsd)">
    <OrderMetrics>
    <OrderItemMetric>
    <submissionDateTime>2001-12-31T12:00:00.000000</submissionDateTime>
    <requestor>123.456.789.000</requestor>
    <product>MYD09Q1</product>
    </OrderItemMetric>
    </OrderMetrics>
    </echoems:ECHOMetrics>

  • ExtractValue and witespace

    Hello!
    I have an xml like this:
    <file>
       <fieldend>'||chr(13)||chr(10)||'</fieldend>
    </file>and when i select it:
    select '"'||ExtractValue(XMLType('<file><fieldend>'||chr(13)||chr(10)||'</fieldend></file>'),
                             'file/fieldend/text()')||'"' "fieldend"
      into sFieldEnd
      from duali have just:
    ""I run it in pl/sql procedure and select it into the string variable, i expect in my string chr(13)||(10).
    How can i get in sFieldEnd value chr(13)||chr(10) ?

    Why not do something like
    declare
      v_mystring varchar2(4000);
      sFieldEnd varchar2(4000);
    begin
      v_mystring := ' ''||chr(13)||chr(10)||'' ';
      sFieldEnd := v_mystring;
      execute immediate ....etc etc etc
    end;
    /(pseudo code)

  • Difference in extractvalue in 9.2.0.3 and 9.2.0.4

    Essentially my problem is that in 9.2.0.3 (Standard Edition Database), the ExtractValue is not removing the xml tags for a select statement, whereas the 9.2.0.4 (Enterprise Edition Database) is. See below.
    In 9.2.0.3 Standard Edition:
    Running the following script;
    1 select
    2 extractValue(value(i),'/tax/batch_no'),
    3 extractValue(value(i),'/tax/sequence_no'),
    4 extractValue(value(i),'/tax/employee_no'),
    5 extractValue(value(i),'/tax/paycode'),
    6 extractValue(value(i),'/tax/taxscl')
    7* from XML_TAX p, table(xmlsequence(extract(value(p),'/alesco/tax'))) i
    Returns:
    <batch_no>7361</batch_no>
    <sequence_no>137</sequence_no>
    <employee_no>2027510</employee_no>
    <paycode>PAYG</paycode>
    <taxscl>2</taxscl>
    The problem is;
    When I run the following in 9.2.0.4 Enterprise Edition, the following dataset is returned, running the same query (with slightly different data, but the tags are removed):
    SQL> select
    2 extractValue(value(i),'/tax/batch_no'),
    3 extractValue(value(i),'/tax/sequence_no'),
    4 extractValue(value(i),'/tax/employee_no'),
    5 extractValue(value(i),'/tax/paycode'),
    6 extractValue(value(i),'/tax/taxscl'),
    7 to_date(extractValue(value(i),'/tax/start_date'),'DD/MM/YYYY')
    8 from XML_TAX p, table(xmlsequence(extract(value(p),'/alesco/tax'))) i;
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    TO_DATE(E
    1011
    1
    2000034
    TAX
    1
    01-DEC-03
    Which is correct and what I expect, as I can now use these variables as to insert etc into other tables.
    Is there an issue with 9.2.0.3 as opposed to 9.2.0.4 ? Or Standard / Enterprise Edition of the databases for XDB calls?
    In partially answering my question; Obviously there is a a difference, but is it documented bug anywhere, or is there a workaround?
    Any advise is appreciated.

    John,
    I also ran your testcase
    below are my results
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    7361
    1
    2000008
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    PAYG
    2
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    7361
    2
    2000021
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    7361
    3
    2000023
    EXTRACTVALUE(VALUE(I),'/TAX/BATCH_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/SEQUENCE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/EMPLOYEE_NO')
    EXTRACTVALUE(VALUE(I),'/TAX/PAYCODE')
    EXTRACTVALUE(VALUE(I),'/TAX/TAXSCL')
    PAYG
    2
    Based off of this can you run this query for me
    select object_name,object_type
    from dba_objects
    where
    object_name like '%EXTRACT%'
    Regards
    Coby D. Adams Jr.

  • EXTRACTVALUE not returning any data

    Hi,
    While executing the below, I am getting no data. Please can you help spot the error.
    The xml is as below:
    <Promos xmlns:Promons="http://www.some-site.com"
    xmlns="http://www.some-site.com">
    <total>1</total>
    <Promo>
    <Line>12</Line>
    <Num>IO2R1RC</Num>
    </Promo>
    </Promos>
    The query is as below:
    SELECT EXTRACTVALUE (VALUE (promos), '//total') total,
    EXTRACTVALUE (VALUE (promos), '//line') line
    FROM TABLE
    (XMLSEQUENCE
    (EXTRACT
    (XMLTYPE
    ('<Promos xmlns:Promons="http://www.some-site.com" xmlns="http://www.some-site.com"><total>1</total><Promo><Line>12</Line><Num>IO2R1RC</Num></Promo></Promos>'
    '//Promos/total'
    ) promos

    Hi,
    I see two issues here.
    1) You have to declare all namespaces you're going to use in XPath/XQuery expressions (that's a very common gotcha).
    2) You've got some XPath wrong.
    See below example, assuming "v_xmldoc" is an XMLType variable holding your XML data :
    SELECT EXTRACTVALUE(v_xmldoc, '/Promos/total', 'xmlns="http://www.some-site.com"') as total
         , EXTRACTVALUE(VALUE(promos), '/Promo/Line', 'xmlns="http://www.some-site.com"') as line
         , EXTRACTVALUE(VALUE(promos), '/Promo/Num', 'xmlns="http://www.some-site.com"') as num
    FROM TABLE(
           XMLSEQUENCE(
             EXTRACT(
               v_xmldoc
             , '/Promos/Promo'
             , 'xmlns="http://www.some-site.com"'
         ) promos
    ;That example also assumes that Promo elements may occur multiple times.
    Consequently, you need to break the collection into separate records, then access a specific element of a given record with EXTRACTVALUE.
    Hope that helps.
    Some posting tips as well :
    - please always give your database version (select * from v$version), it'll help people here suggesting adequate solutions. For instance, if you're on 10.2 or above, you could use XMLTable instead.
    - when pasting code snippets or tagged content, always use tags to enclose your text, it'll preserve formatting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Extractvalue giving ORA-00932 when used in PL/SQL

    Hi,
    When I use the extractvalue function from within PL/SQL I get this error:
    ORA-00932: inconsistent datatypes: expected NUMBER got
    SINAPP.body.contentType1898_T
    The same SQL statement run from SQL Plus gives me the correct result. Is there any difference in calling this function from within PL/SQL?
    This is my SQL:
    select extractvalue (value(p),
    '/NewsML/NewsItem/NewsComponent/ContentItem/DataContent/body/body.content')
    into story from sin_xml_cx_temp p where
    extract(value(p),
    '/NewsML/NewsItem/NewsComponent/AdministrativeMetadata/FileName/text()').getStringval() = '39039859.xml';
    The Oracle version we are using is 9.2.0.3
    Here is the XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.sin.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sin.com" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified">
    <!-- enabling xml:lang attribute -->
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:complexType name="AdministrativeMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="FileName" type="FileNameType" minOccurs="0"/>
    <xs:element name="SystemIdentifier" type="SystemIdentifierType" minOccurs="0"/>
    <xs:element name="Provider" type="ProviderType" minOccurs="0"/>
    <xs:element name="Creator" type="CreatorType" minOccurs="0"/>
    <xs:element name="Source" type="SourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Contributor" type="ContributorType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <!-- All attributes are optional by default!!! -->
    </xs:complexType>
    <xs:complexType name="AssociatedWithType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="BasisForChoiceType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Rank" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    <!-- The simpleContent element contains extensions or restrictions on a text-only complex
    type or on a simple type as content and contains no elements. -->
    </xs:complexType>
    <!-- A mixed complex type element can contain attributes, elements, and text -->
    <xs:complexType name="ByLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CatalogType">
    <xs:sequence>
    <xs:element name="Resource" type="ResourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicUse" type="TopicUseType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CharacteristicsType">
    <xs:sequence>
    <xs:element name="SizeInBytes" type="SizeInBytesType" minOccurs="0"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CommentType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="TranslationOf" type="xs:IDREF"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ContentItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MediaType" type="MediaTypeType" minOccurs="0"/>
    <xs:element name="Format" type="FormatType" minOccurs="0"/>
    <xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
    <xs:element name="Notation" type="NotationType" minOccurs="0"/>
    <xs:element name="Characteristics" type="CharacteristicsType" minOccurs="0"/>
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ContributorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightHolder" type="CopyrightHolderType"/>
    <xs:element name="CopyrightDate" type="CopyrightDateType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CreatorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CreditLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DataContentType" mixed="true">
    <xs:sequence>
    <xs:element name="head" type="headType"/>
    <xs:element name="body" type="bodyType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DateAndTimeType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="DateId" type="xs:string"/>
    <xs:complexType name="DateLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DateLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DefaultVocabularyForType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Context" type="xs:string" use="required"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DeleteType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DescriptionType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="Variant" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DescriptiveMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Genre" type="GenreType" minOccurs="0"/>
    <xs:element name="SubjectCode" type="SubjectCodeType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="OfInterestTo" type="OfInterestToType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicOccurrence" type="TopicOccurrenceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="EncodingType">
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Notation" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="EndDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FileNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FirstCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormalNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormatType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FutureStatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GenreType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GeographyType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="HeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="IdentificationType">
    <xs:sequence>
    <xs:element name="NewsIdentifier" type="NewsIdentifierType"/>
    <xs:element name="NameLabel" type="NameLabelType" minOccurs="0"/>
    <xs:element name="DateLabel" type="DateLabelType" minOccurs="0"/>
    <xs:element name="Label" type="LabelType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="InsertAfterType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InsertBeforeType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InstructionType">
    <xs:sequence>
    <xs:element name="RevisionStatus" type="RevisionStatusType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="KeywordLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="LabelType">
    <xs:sequence>
    <xs:element name="LabelType" type="LabelTypeType"/>
    <xs:element name="LabelText" type="LabelTextType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LabelTextType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="LabelTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LanguageType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LimitationsType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MediaTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MetadataType" type="MetadataTypeType"/>
    <xs:element name="Property" type="PropertyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MimeTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NameLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsComponentType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Role" type="RoleType" minOccurs="0"/>
    <xs:element name="BasisForChoice" type="BasisForChoiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLines" type="NewsLinesType" minOccurs="0"/>
    <xs:element name="AdministrativeMetadata" type="AdministrativeMetadataType" minOccurs="0"/>
    <xs:element name="RightsMetadata" type="RightsMetadataType" minOccurs="0"/>
    <xs:element name="DescriptiveMetadata" type="DescriptiveMetadataType" minOccurs="0"/>
    <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:choice minOccurs="0">
    <xs:choice maxOccurs="unbounded">
    <xs:element name="NewsItem" type="NewsItemType"/>
    <xs:element name="NewsItemRef" type="NewsItemRefType"/>
    </xs:choice>
    <xs:element name="NewsComponent" type="NewsComponentType" maxOccurs="unbounded"/>
    <xs:element name="ContentItem" type="ContentItemType" maxOccurs="unbounded"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Essential" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EquivalentsList" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsEnvelopeType">
    <xs:sequence>
    <xs:element name="TransmissionId" type="TransmissionIdType" minOccurs="0"/>
    <xs:element name="SentFrom" type="SentFromType" minOccurs="0"/>
    <xs:element name="SentTo" type="SentToType" minOccurs="0"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    <xs:element name="NewsService" type="NewsServiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsProduct" type="NewsProductType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Priority" type="PriorityType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsIdentifierType">
    <xs:sequence>
    <xs:element name="ProviderId" type="ProviderIdType"/>
    <xs:element ref="DateId"/>
    <xs:element name="NewsItemId" type="NewsItemIdType"/>
    <xs:element name="RevisionId" type="RevisionIdType"/>
    <xs:element ref="PublicIdentifier"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NewsItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Identification" type="IdentificationType"/>
    <xs:element name="NewsManagement" type="NewsManagementType"/>
    <xs:choice minOccurs="0">
    <xs:element name="NewsComponent" type="NewsComponentType"/>
    <xs:element name="Update" type="UpdateType" maxOccurs="unbounded"/>
    <xs:element name="TopicSet" type="TopicSetType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsItemIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsItemRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsItemTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineType">
    <xs:sequence>
    <xs:element name="NewsLineType" type="NewsLineTypeType"/>
    <xs:element name="NewsLineText" type="NewsLineTextType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTextType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLinesType">
    <xs:sequence>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="HeadLine" type="HeadLineType"/>
    <xs:element name="SubHeadLine" type="SubHeadLineType" minOccurs="0"/>
    </xs:sequence>
    <xs:element name="ByLine" type="ByLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DateLine" type="DateLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CreditLine" type="CreditLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightLine" type="CopyrightLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="RightsLine" type="RightsLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SeriesLine" type="SeriesLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SlugLine" type="SlugLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="KeywordLine" type="KeywordLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLine" type="NewsLineType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:element name="NewsML" xdb:defaultTable="SIN_XML_CX_TEMP">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:sequence>
    <xs:element name="NewsEnvelope" type="NewsEnvelopeType"/>
    <xs:element name="NewsItem" type="NewsItemType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="NewsManagementType">
    <xs:sequence>
    <xs:element name="NewsItemType" type="NewsItemTypeType"/>
    <xs:element name="FirstCreated" type="FirstCreatedType"/>
    <xs:element name="ThisRevisionCreated" type="ThisRevisionCreatedType"/>
    <xs:element name="Status" type="StatusType"/>
    <xs:element name="StatusWillChange" type="StatusWillChangeType" minOccurs="0"/>
    <xs:element name="Urgency" type="UrgencyType" minOccurs="0"/>
    <xs:element name="RevisionHistory" type="RevisionHistoryType" minOccurs="0"/>
    <xs:element name="DerivedFrom" type="DerivedFromType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="AssociatedWith" type="AssociatedWithType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Instruction" type="InstructionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsProductType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsServiceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NotationType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OfInterestToType">
    <xs:sequence>
    <xs:element name="Relevance" type="RelevanceType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OriginType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PartyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PriorityType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PropertyType">
    <xs:sequence>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Value" type="xs:string"/>
    <xs:attribute name="ValueRef" type="xs:string"/>
    <xs:attribute name="AllowedValues" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="PublicIdentifier" type="xs:string"/>
    <xs:complexType name="RelevanceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ReplaceType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="ResourceType">
    <xs:sequence>
    <xs:element name="Urn" type="UrnType" minOccurs="0"/>
    <xs:element name="Url" type="UrlType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DefaultVocabularyFor" type="DefaultVocabularyForType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RevisionHistoryType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="RevisionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="PreviousRevision" type="xs:string" use="required"/>
    <xs:attribute name="Update" type="xs:string" use="required"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="RevisionStatusType">
    <xs:sequence>
    <xs:element name="Status" type="StatusType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Revision" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="RightsMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Copyright" type="CopyrightType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="UsageRights" type="UsageRightsType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RoleType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentToType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SeriesLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SizeInBytesType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="SlugLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SourceType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StartDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusWillChangeType">
    <xs:sequence>
    <xs:element name="FutureStatus" type="FutureStatusType"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubHeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SubjectType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectCodeType">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:choice>
    <xs:element name="Subject" type="SubjectType"/>
    <xs:element name="SubjectMatter" type="SubjectMatterType"/>
    <xs:element name="SubjectDetail" type="SubjectDetailType"/>
    </xs:choice>
    <xs:element name="SubjectQualifier" type="SubjectQualifierType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectDetailType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectMatterType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectQualifierType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SystemIdentifierType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ThisRevisionCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="TopicType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicType" type="TopicTypeType" maxOccurs="unbounded"/>
    <xs:element name="FormalName" type="FormalNameType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Details" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicOccurrenceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSetRef" type="TopicSetRefType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Topic" type="TopicType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="TopicSet" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicUseType">
    <xs:attribute name="Topic" type="xs:string" use="required"/>
    <xs:attribute name="Context" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TransmissionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Repeat" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UpdateType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="InsertBefore" type="InsertBeforeType"/>
    <xs:element name="InsertAfter" type="InsertAfterType"/>
    <xs:element name="Replace" type="ReplaceType"/>
    <xs:element name="Delete" type="DeleteType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrgencyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrlType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UrnType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UsageRightsType">
    <xs:sequence>
    <xs:element name="UsageType" type="UsageTypeType" minOccurs="0"/>
    <xs:element name="Geography" type="GeographyType" minOccurs="0"/>
    <xs:element name="RightsHolder" type="RightsHolderType" minOccurs="0"/>
    <xs:element name="Limitations" type="LimitationsType" minOccurs="0"/>
    <xs:element name="StartDate" type="StartDateType" minOccurs="0"/>
    <xs:element name="EndDate" type="EndDateType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UsageTypeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="bodyType">
    <xs:sequence>
    <xs:element name="body.head" type="body.headType" xdb:SQLName="BODY_HEAD"/>
    <xs:element name="body.content" type="body.contentType" xdb:SQLName="BODY_CONTENT"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="body.contentType">
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="p"/>
    <xs:element ref="pre"/>
    </xs:choice>
    </xs:complexType>
    <xs:complexType name="body.headType">
    <xs:sequence>
    <xs:element ref="distributor"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="distributor" type="xs:string"/>
    <xs:complexType name="headType">
    <xs:sequence>
    <xs:element name="meta" type="metaType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="metaType">
    <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
    <xs:attribute name="content" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:element name="p" type="xs:string"/>
    <xs:element name="pre" type="xs:string"/>
    </xs:schema>

    Hi,
    When I use the extractvalue function from within PL/SQL I get this error:
    ORA-00932: inconsistent datatypes: expected NUMBER got
    SINAPP.body.contentType1898_T
    The same SQL statement run from SQL Plus gives me the correct result. Is there any difference in calling this function from within PL/SQL?
    This is my SQL:
    select extractvalue (value(p),
    '/NewsML/NewsItem/NewsComponent/ContentItem/DataContent/body/body.content')
    into story from sin_xml_cx_temp p where
    extract(value(p),
    '/NewsML/NewsItem/NewsComponent/AdministrativeMetadata/FileName/text()').getStringval() = '39039859.xml';
    The Oracle version we are using is 9.2.0.3
    Here is the XML schema:
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.sin.com" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sin.com" xmlns:xdb="http://xmlns.oracle.com/xdb" elementFormDefault="qualified">
    <!-- enabling xml:lang attribute -->
    <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
    <xs:complexType name="AdministrativeMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="FileName" type="FileNameType" minOccurs="0"/>
    <xs:element name="SystemIdentifier" type="SystemIdentifierType" minOccurs="0"/>
    <xs:element name="Provider" type="ProviderType" minOccurs="0"/>
    <xs:element name="Creator" type="CreatorType" minOccurs="0"/>
    <xs:element name="Source" type="SourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Contributor" type="ContributorType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <!-- All attributes are optional by default!!! -->
    </xs:complexType>
    <xs:complexType name="AssociatedWithType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="BasisForChoiceType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Rank" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    <!-- The simpleContent element contains extensions or restrictions on a text-only complex
    type or on a simple type as content and contains no elements. -->
    </xs:complexType>
    <!-- A mixed complex type element can contain attributes, elements, and text -->
    <xs:complexType name="ByLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CatalogType">
    <xs:sequence>
    <xs:element name="Resource" type="ResourceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicUse" type="TopicUseType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CharacteristicsType">
    <xs:sequence>
    <xs:element name="SizeInBytes" type="SizeInBytesType" minOccurs="0"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CommentType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="TranslationOf" type="xs:IDREF"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ContentItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MediaType" type="MediaTypeType" minOccurs="0"/>
    <xs:element name="Format" type="FormatType" minOccurs="0"/>
    <xs:element name="MimeType" type="MimeTypeType" minOccurs="0"/>
    <xs:element name="Notation" type="NotationType" minOccurs="0"/>
    <xs:element name="Characteristics" type="CharacteristicsType" minOccurs="0"/>
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ContributorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightHolder" type="CopyrightHolderType"/>
    <xs:element name="CopyrightDate" type="CopyrightDateType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CopyrightDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CopyrightLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="CreatorType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="CreditLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DataContentType" mixed="true">
    <xs:sequence>
    <xs:element name="head" type="headType"/>
    <xs:element name="body" type="bodyType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DateAndTimeType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="DateId" type="xs:string"/>
    <xs:complexType name="DateLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DateLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="DefaultVocabularyForType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Context" type="xs:string" use="required"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DeleteType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="DerivedFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="DescriptionType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="Variant" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="DescriptiveMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Language" type="LanguageType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Genre" type="GenreType" minOccurs="0"/>
    <xs:element name="SubjectCode" type="SubjectCodeType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="OfInterestTo" type="OfInterestToType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="TopicOccurrence" type="TopicOccurrenceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="EncodingType">
    <xs:choice minOccurs="0">
    <xs:element name="Encoding" type="EncodingType"/>
    <xs:element name="DataContent" type="DataContentType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Notation" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="EndDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FileNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FirstCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormalNameType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="FormatType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="FutureStatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GenreType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="GeographyType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="HeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="IdentificationType">
    <xs:sequence>
    <xs:element name="NewsIdentifier" type="NewsIdentifierType"/>
    <xs:element name="NameLabel" type="NameLabelType" minOccurs="0"/>
    <xs:element name="DateLabel" type="DateLabelType" minOccurs="0"/>
    <xs:element name="Label" type="LabelType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="InsertAfterType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InsertBeforeType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="InstructionType">
    <xs:sequence>
    <xs:element name="RevisionStatus" type="RevisionStatusType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="KeywordLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="LabelType">
    <xs:sequence>
    <xs:element name="LabelType" type="LabelTypeType"/>
    <xs:element name="LabelText" type="LabelTextType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LabelTextType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="LabelTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LanguageType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="LimitationsType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MediaTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="MetadataType" type="MetadataTypeType"/>
    <xs:element name="Property" type="PropertyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MetadataTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="MimeTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NameLabelType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsComponentType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Role" type="RoleType" minOccurs="0"/>
    <xs:element name="BasisForChoice" type="BasisForChoiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLines" type="NewsLinesType" minOccurs="0"/>
    <xs:element name="AdministrativeMetadata" type="AdministrativeMetadataType" minOccurs="0"/>
    <xs:element name="RightsMetadata" type="RightsMetadataType" minOccurs="0"/>
    <xs:element name="DescriptiveMetadata" type="DescriptiveMetadataType" minOccurs="0"/>
    <xs:element name="Metadata" type="MetadataType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:choice minOccurs="0">
    <xs:choice maxOccurs="unbounded">
    <xs:element name="NewsItem" type="NewsItemType"/>
    <xs:element name="NewsItemRef" type="NewsItemRefType"/>
    </xs:choice>
    <xs:element name="NewsComponent" type="NewsComponentType" maxOccurs="unbounded"/>
    <xs:element name="ContentItem" type="ContentItemType" maxOccurs="unbounded"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Essential" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="EquivalentsList" default="no">
    <xs:simpleType>
    <xs:restriction base="xs:NMTOKEN">
    <xs:enumeration value="yes"/>
    <xs:enumeration value="no"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:attribute>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsEnvelopeType">
    <xs:sequence>
    <xs:element name="TransmissionId" type="TransmissionIdType" minOccurs="0"/>
    <xs:element name="SentFrom" type="SentFromType" minOccurs="0"/>
    <xs:element name="SentTo" type="SentToType" minOccurs="0"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    <xs:element name="NewsService" type="NewsServiceType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsProduct" type="NewsProductType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Priority" type="PriorityType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsIdentifierType">
    <xs:sequence>
    <xs:element name="ProviderId" type="ProviderIdType"/>
    <xs:element ref="DateId"/>
    <xs:element name="NewsItemId" type="NewsItemIdType"/>
    <xs:element name="RevisionId" type="RevisionIdType"/>
    <xs:element ref="PublicIdentifier"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="NewsItemType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Identification" type="IdentificationType"/>
    <xs:element name="NewsManagement" type="NewsManagementType"/>
    <xs:choice minOccurs="0">
    <xs:element name="NewsComponent" type="NewsComponentType"/>
    <xs:element name="Update" type="UpdateType" maxOccurs="unbounded"/>
    <xs:element name="TopicSet" type="TopicSetType"/>
    </xs:choice>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsItemIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="NewsItemRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsItemTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineType">
    <xs:sequence>
    <xs:element name="NewsLineType" type="NewsLineTypeType"/>
    <xs:element name="NewsLineText" type="NewsLineTextType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTextType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="NewsLineTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsLinesType">
    <xs:sequence>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="HeadLine" type="HeadLineType"/>
    <xs:element name="SubHeadLine" type="SubHeadLineType" minOccurs="0"/>
    </xs:sequence>
    <xs:element name="ByLine" type="ByLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DateLine" type="DateLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CreditLine" type="CreditLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="CopyrightLine" type="CopyrightLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="RightsLine" type="RightsLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SeriesLine" type="SeriesLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="SlugLine" type="SlugLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="KeywordLine" type="KeywordLineType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="NewsLine" type="NewsLineType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:element name="NewsML" xdb:defaultTable="SIN_XML_CX_TEMP">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSet" type="TopicSetType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:sequence>
    <xs:element name="NewsEnvelope" type="NewsEnvelopeType"/>
    <xs:element name="NewsItem" type="NewsItemType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    </xs:element>
    <xs:complexType name="NewsManagementType">
    <xs:sequence>
    <xs:element name="NewsItemType" type="NewsItemTypeType"/>
    <xs:element name="FirstCreated" type="FirstCreatedType"/>
    <xs:element name="ThisRevisionCreated" type="ThisRevisionCreatedType"/>
    <xs:element name="Status" type="StatusType"/>
    <xs:element name="StatusWillChange" type="StatusWillChangeType" minOccurs="0"/>
    <xs:element name="Urgency" type="UrgencyType" minOccurs="0"/>
    <xs:element name="RevisionHistory" type="RevisionHistoryType" minOccurs="0"/>
    <xs:element name="DerivedFrom" type="DerivedFromType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="AssociatedWith" type="AssociatedWithType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Instruction" type="InstructionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsProductType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NewsServiceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="NotationType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OfInterestToType">
    <xs:sequence>
    <xs:element name="Relevance" type="RelevanceType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="OriginType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PartyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PriorityType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="PropertyType">
    <xs:sequence>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Value" type="xs:string"/>
    <xs:attribute name="ValueRef" type="xs:string"/>
    <xs:attribute name="AllowedValues" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ProviderIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Vocabulary" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:element name="PublicIdentifier" type="xs:string"/>
    <xs:complexType name="RelevanceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="ReplaceType" mixed="true">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="DuidRef" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="ResourceType">
    <xs:sequence>
    <xs:element name="Urn" type="UrnType" minOccurs="0"/>
    <xs:element name="Url" type="UrlType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="DefaultVocabularyFor" type="DefaultVocabularyForType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RevisionHistoryType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Href" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:complexType name="RevisionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="PreviousRevision" type="xs:string" use="required"/>
    <xs:attribute name="Update" type="xs:string" use="required"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="RevisionStatusType">
    <xs:sequence>
    <xs:element name="Status" type="StatusType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Revision" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsHolderType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RightsLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="RightsMetadataType">
    <xs:sequence>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="Copyright" type="CopyrightType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="UsageRights" type="UsageRightsType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="RoleType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentFromType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SentToType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SeriesLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SizeInBytesType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="SlugLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SourceType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Party" type="PartyType" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="NewsItem" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StartDateType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="StatusWillChangeType">
    <xs:sequence>
    <xs:element name="FutureStatus" type="FutureStatusType"/>
    <xs:element name="DateAndTime" type="DateAndTimeType"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubHeadLineType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    </xs:complexType>
    <xs:complexType name="SubjectType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectCodeType">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:choice>
    <xs:element name="Subject" type="SubjectType"/>
    <xs:element name="SubjectMatter" type="SubjectMatterType"/>
    <xs:element name="SubjectDetail" type="SubjectDetailType"/>
    </xs:choice>
    <xs:element name="SubjectQualifier" type="SubjectQualifierType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectDetailType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectMatterType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SubjectQualifierType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="SystemIdentifierType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="ThisRevisionCreatedType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="TopicType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicType" type="TopicTypeType" maxOccurs="unbounded"/>
    <xs:element name="FormalName" type="FormalNameType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Description" type="DescriptionType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Property" type="PropertyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Details" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicOccurrenceType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    <xs:attribute name="Topic" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Catalog" type="CatalogType" minOccurs="0"/>
    <xs:element name="TopicSetRef" type="TopicSetRefType" minOccurs="0" maxOccurs="unbounded"/>
    <xs:element name="Topic" type="TopicType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicSetRefType">
    <xs:sequence>
    <xs:element name="Comment" type="CommentType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="TopicSet" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicTypeType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TopicUseType">
    <xs:attribute name="Topic" type="xs:string" use="required"/>
    <xs:attribute name="Context" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="TransmissionIdType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="Repeat" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UpdateType">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="InsertBefore" type="InsertBeforeType"/>
    <xs:element name="InsertAfter" type="InsertAfterType"/>
    <xs:element name="Replace" type="ReplaceType"/>
    <xs:element name="Delete" type="DeleteType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrgencyType">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="FormalName" type="xs:string" use="required"/>
    <xs:attribute name="Vocabulary" type="xs:string"/>
    <xs:attribute name="Scheme" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UrlType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UrnType">
    <xs:simpleContent>
    <xs:extension base="xs:string">
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    <xs:complexType name="UsageRightsType">
    <xs:sequence>
    <xs:element name="UsageType" type="UsageTypeType" minOccurs="0"/>
    <xs:element name="Geography" type="GeographyType" minOccurs="0"/>
    <xs:element name="RightsHolder" type="RightsHolderType" minOccurs="0"/>
    <xs:element name="Limitations" type="LimitationsType" minOccurs="0"/>
    <xs:element name="StartDate" type="StartDateType" minOccurs="0"/>
    <xs:element name="EndDate" type="EndDateType" minOccurs="0"/>
    </xs:sequence>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="UsageTypeType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
    <xs:element name="Origin" type="OriginType"/>
    </xs:choice>
    <xs:attribute name="Duid" type="xs:ID"/>
    <xs:attribute name="Euid" type="xs:string"/>
    <xs:attribute ref="xml:lang"/>
    <xs:attribute name="AssignedBy" type="xs:string"/>
    <xs:attribute name="Importance" type="xs:string"/>
    <xs:attribute name="Confidence" type="xs:string"/>
    <xs:attribute name="HowPresent" type="xs:string"/>
    <xs:attribute name="DateAndTime" type="xs:string"/>
    </xs:complexType>
    <xs:complexType name="bodyType">
    <xs:sequence>
    <xs:element name="body.head" type="body.headType" xdb:SQLName="BODY_HEAD"/>
    <xs:element name="body.content" type="body.contentType" xdb:SQLName="BODY_CONTENT"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="body.contentType">
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="p"/>
    <xs:element ref="pre"/>
    </xs:choice>
    </xs:complexType>
    <xs:complexType name="body.headType">
    <xs:sequence>
    <xs:element ref="distributor"/>
    </xs:sequence>
    </xs:complexType>
    <xs:element name="distributor" type="xs:string"/>
    <xs:complexType name="headType">
    <xs:sequence>
    <xs:element name="meta" type="metaType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="metaType">
    <xs:attribute name="name" type="xs:NMTOKEN" use="required"/>
    <xs:attribute name="content" type="xs:string" use="required"/>
    </xs:complexType>
    <xs:element name="p" type="xs:string"/>
    <xs:element name="pre" type="xs:string"/>
    </xs:schema>

  • What is wrong in displaying extractValue

    Hi,
    I'm new in XMLDB and I have a simple query, but the displaying and output looks different from all the examples.
    What did I wron? Can someone help me?
    This is the Query:
    select
      extractValue(OBJECT_VALUE, '/STEP-ProductInformation/Products/Product/Product[@ID="GoldenRecord"]/Name') as GR
    from PIM_PRODUCTS
    This is the output:
    SQL> @x11
    GR(SYS_XDBPD$, Changed(VALUE), QualifierID)
    Name2772_COLL(NameType2771_T(XDB$RAW_LIST_T('1300010005000D476F6C64656E205265636
    F726400'), XDB$ENUM_T('01'), NULL))

    Hi,
    XML DB questions are better submitted in the XML DB forum.
    Which examples are you following?
    What's the database version?
    If you want help, prepare yourself to provide a complete test case, including the XML schema and at least a sample XML document.

  • ERROR: ORA-19025: EXTRACTVALUE returns... after a deleteXML command.

    Hi
    My Oracle details are:
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    I'm getting the following error:
    ERROR:
    ORA-19025: EXTRACTVALUE returns value of only one node
    when I try and select the content of a row after I have performed an deleteXML command on a node from with in the xml content.
    This process can reproduced the error.
    CREATE TABLE test OF XMLType xmltype STORE as BINARY XML;
    INSERT INTO test VALUES (XmlType('<product_details id="1"><product id="21"><name>test1</name><code>123</code></product><product id="20"><name>test2</name><code>456</code></product></product_details>'));Select the xml content...
    SELECT extract(OBJECT_VALUE, '/product_details[@id=1]') "Xml" FROM test WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    <product_details id="1">
      <product id="21">
        <name>test1</name>
        <code>123</code>
      </product>
      <product id="20">
        <name>test2</name>
        <code>456</code>
      </product>
    </product_details>then delete the product node with id = 21 from the xml content...
    UPDATE test SET OBJECT_VALUE = deleteXML(OBJECT_VALUE, '/product_details[@id=1]/product[@id=21]')  WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    1 row updated.The same select now produces the following error:
    SELECT extract(OBJECT_VALUE, '/product_details[@id=1]') "Xml" FROM test WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    ERROR:
    ORA-19025: EXTRACTVALUE returns value of only one node
    no rows selectedThe current content of the test table is:
    SELECT * FROM test;
    <product_details id="1">
      <product id="20">
        <name>test2</name>
        <code>456</code>
      </product>
    </product_details>I would now expect the select statement:
    SELECT extract(OBJECT_VALUE, '/product_details[@id=1]') "Xml" FROM test WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    to return:
    <product_details id="1">
      <product id="20">
        <name>test2</name>
        <code>456</code>
      </product>
    </product_details>Can anyone tell me why this select is not returning any rows and an error message?
    Having done some more research around this problem, it would seem that deleting the last node first ie the node with the product id of 20 does not cause the error!
    eg running the following deleteXML works as I would expect:
    UPDATE test SET OBJECT_VALUE = deleteXML(OBJECT_VALUE, '/product_details[@id=1]/product[@id=20]')  WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    1 row updated.then running...
    SELECT extract(OBJECT_VALUE, '/product_details[@id=1]') "Xml" FROM test WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    <product_details id="1">
      <product id="21">
        <name>test1</name>
        <code>123</code>
      </product>
    </product_details>returns what I would expect.
    Many thanks
    Edited by: Baseman on 20-Apr-2011 16:55
    Edited by: Baseman on 20-Apr-2011 17:00

    I tried it myself and found something very strange. It seems when using xmltype with binary storage, that oracle isnt able to read xmldata, the same way that it reads using clob storage.
    Here is what I get if I use clob storage:
    CREATE TABLE test_clob OF XMLType xmltype STORE as CLOB;
    INSERT INTO test_clob VALUES (XmlType('<product_details id="1"><product id="21"><name>test1</name><code>123</code></product><product id="20"><name>test2</name><code>456</code></product></product_details>'));
    UPDATE test_clob SET OBJECT_VALUE = deleteXML(OBJECT_VALUE, '/product_details[@id=1]/product[@id=21]') 
    WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    SELECT extract(OBJECT_VALUE, '/product_details[@id=1]') "Xml"
    FROM test_clob WHERE XMLEXISTS('/product_details[@id=1]' PASSING OBJECT_VALUE);
    -- works fine and prints out:
    <product_details id="1"><product id="20"><name>test2</name><code>456</code></product></product_details>
    SELECT t.*, x.*
    ,extract(value(x), '/product_details/@id') id
    FROM test_clob t, table (xmlsequence(extract(t.object_value,'/product_details'))) xThe last select statement prints out the "id" as "1" which we expected.
    But if I use the same select statement in your example on a table test like this:
    SELECT t.*, x.column_value
    ,extract(value(x), '/product_details/@id') id
    FROM test t, table (xmlsequence(extract(t.object_value,'/product_details'))) xit prints out:
    120
    <name>test2</name>
    <code>456</code>It seem it printed out the "id" from product_details, plus "id" from "product" plus all the data of the element product.
    Edited by: Romci on 3.5.2011 13:16

  • Extracting data from XML using  extractValue

    Given the following XML stored as xmlType in the database(table name
    :opfdata) , i woiuld like to query it using extractValue,existsNode to
    retrieve the title of the book (dc:Title).
    i wrote the following query
    select e.existsNode('/package/metadata/dc-metadata/dc-Title
    unique-identifier="uid"') from opfdata e;
    Gives result as 1.
    But if i run change existNode to extractValue it gives me an error
    daying the xpath expression is wrong.
    Any ideas?
    <package unique-identifier="uid"
    xmlns="http://openebook.org/namespaces/oeb-package/1.0/">
    <!-- Metadata follows, Dublin core plus any metadata extensions-->
    <metadata>
    <dc-metadata xmlns:dc="http://purl.org/dc/elements/1.0/"
    xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">
    <dc:Title>Midnight Come Again</dc:Title>
    <dc:Subject>Shugak, Kate (Fictitious character)
    Fiction.</dc:Subject>
    <dc:Subject>Women private investigators -- Alaska
    Fiction.</dc:Subject>
    <dc:Subject>Smuggling Fiction.</dc:Subject>
    <dc:Subject>Alaska Fiction.</dc:Subject>
    <dc:Subject>Mystery fiction.</dc:Subject>
    <dc:Identifier id="uid"
    scheme="DTB">us-nls-db00010</dc:Identifier>
    <dc:Creator role="aut">Dana Stabenow</dc:Creator>
    <dc:Source>ISBN-0-312-20596-1</dc:Source>
    <dc:Publisher>National Library Service for the Blind and
    Physically
    Handicapped</dc:Publisher>
    <dc:Date>2002-5</dc:Date>
    <dc:Format>ANSI/NISO Z39.86-2002</dc:Format>
    <dc:Description>Following the death of her lover, in Hunter's
    Moon (RC 49633), depressed Kate Shugak takes a job in a coastal
    village as a cargo pilot. Meanwhile Alaska state trooper Jim Chopin is
    sent there under cover to investigate Russian smugglers. Some explicit
    descriptions of sex, some violence, and some strong language. 2000.
    </dc:Description>
    <dc:Language>en</dc:Language>
    </dc-metadata>
    </package>

    Hi,
    First of all what is the result of the query
    select e.existsNode('/package/metadata/dc-metadata/dc-Title
    unique-identifier="uid"') from opfdata e;
    existsNode returns 1 if it finds the row and 0 if it doesn't find the node.
    The xpath which you need to give to retrieve to retrieve the title of the book is:
    '/package/metadata/dc-metadata/title'
    You can refer the following link to know more about existsNode and extractValue
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96620/xdb03usg.htm#1036760
    You can check the samples on XML DB which uses the different functionalities of Oracle XML DB.
    http://otn.oracle.com/sample_code/tech/xml/xmldb/content.html
    Check the Survey Sample which uses many features of XML DB. The sample is located at:
    http://otn.oracle.com/sample_code/tech/xml/survey/content.html
    and the various features used in the sample are explained in the page:
    http://otn.oracle.com/sample_code/tech/xml/survey/docs/AboutOracleXMLDB.html
    Regards,
    Anupama
    http://otn.oracle.com/sample_code/content.html

  • XML - ORA-19025: EXTRACTVALUE returns value of only one node

    Hi,
    I am new to XML DB. Can somebody help me with the below XML
    I use the following XML ... (I have pasted only a part of it coz i require data only till this section )
    XML
    <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><SOAP-ENV:Body>
    <ns:PicklistWS_GetPicklistValues_Output xmlns:ns="urn:crmondemand/ws/picklist/">
    <ListOfParentPicklistValue xmlns="urn:/crmondemand/xml/picklist">
    <ParentPicklistValue>
    <Language>ENU</Language>
    <ParentFieldName>plProduct_Team</ParentFieldName>
    <ParentDisplayValue>Marketing On Demand</ParentDisplayValue>
    <ParentCode>Marketing On Demand</ParentCode>
    <Disabled>N</Disabled>
    <ListOfPicklistValue>
    <PicklistValue>
    <Code>OCP/SME Escalation</Code>
    <DisplayValue>OCP/SME Escalation</DisplayValue>
    <Disabled>N</Disabled>
    </PicklistValue>
    <PicklistValue>
    <Code>Fusion Request</Code>
    <DisplayValue>Fusion Request</DisplayValue>
    <Disabled>N</Disabled>
    </PicklistValue>
    Code
    SELECT distinct
    EXTRACTVALUE(VALUE(SR), '/ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code','xmlns="urn:/crmondemand/xml/picklist"') AS Display,
    EXTRACTVALUE(VALUE(SR),'/ParentPicklistValue/ListOfPicklistValue/PicklistValue/DisplayValue','xmlns="urn:/crmondemand/xml/picklist"') AS Return,
    EXTRACTVALUE(VALUE(SR),'/ParentPicklistValue/ParentDisplayValue','xmlns="urn:/crmondemand/xml/picklist"') AS parent_display,
    EXTRACTVALUE(VALUE(SR),'/ParentPicklistValue/ParentCode','xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    FROM TABLE(XMLSEQUENCE(EXTRACT(
    WEB_SERVICE('<?xml version="1.0" encoding="UTF-8" standalone="no"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <PicklistWS_GetPicklistValues_Input xmlns="urn:crmondemand/ws/picklist/">
    <FieldName>Type</FieldName>
    <RecordType>Service Request</RecordType>
    </PicklistWS_GetPicklistValues_Input>
    </soap:Body>
    </soap:Envelope>'
    ,'document/urn:crmondemand/ws/picklist/:GetPicklistValues', Sessionid),
    '/soap:Envelope/soap:Body/*/*/*','xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/'))) SR
    ERROR
    ORA-19025: EXTRACTVALUE returns value of only one node
    UNDERSTANDING
    As my Xpath points only until the node - ParentPicklistValue and not the child nodes under it. Hence when i try to query the child nodes - /ParentPicklistValue/ListOfPicklistValue/PicklistValue/Code, I recieve the above mentioned error.
    REQUIREMENT
    Can somebody help me to recieve the Parent values and also its child values based on the above query and xml.

    Hi,
    That's a classic ;)
    You need a second XMLSequence that will shred the collection of PicklistValue into relational rows :
    select extractvalue(value(sr2), '/PicklistValue/Code', 'xmlns="urn:/crmondemand/xml/picklist"') AS Display
         , extractvalue(value(sr2), '/PicklistValue/DisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS Return
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentDisplayValue', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_display
         , extractvalue(value(sr1), '/ParentPicklistValue/ParentCode', 'xmlns="urn:/crmondemand/xml/picklist"') AS parent_return
    from table(
           xmlsequence(
             extract( WEB_SERVICE( ... )
                    , '/soap:Envelope/soap:Body/ns:PicklistWS_GetPicklistValues_Output/ListOfParentPicklistValue/ParentPicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"
                       xmlns:ns="urn:crmondemand/ws/picklist/"
                       xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"' )
         ) sr1
       , table(
           xmlsequence(
             extract( value(sr1)
                    , '/ParentPicklistValue/ListOfPicklistValue/PicklistValue'
                    , 'xmlns="urn:/crmondemand/xml/picklist"' )
         ) sr2
    ;What's your database version BTW?
    On 10.2 and up, you may use XMLTable instead.

  • How to use EXTRACTVALUE?

    Hi,
    Iam having table STUDENT which has xml column as DETAILS. The sample xml value is
    <?xml version="1.0" encoding="utf-16"?>
    <STAFF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:sample-school:SBOA">
    <DETAILS>
    <NAME>KUMAR</NAME>
    <CLASS>10</CLASS>
    <SECTION>A</SECTION>
    </DETAILS>
    </STAFF>
    I need to query the records where the <NAME> element contains the value KUMAR irrespective of any name space (xmlns) and irrespective of any root element (here <STAFF>). But EXTRACTVALUE method requires the parameter of EXTRACTVALUE(XMLTYPE_COLUMN,XPath, namespace).
    Is that possible to query the xml column values irrespective of any namespace and any XPath in Oracle? If yes, please tell me the solution

    Hi,
    Also possible on 10.2.0.1
    SQL> WITH t AS (SELECT
      2                 XMLType('<STAFF xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:sample-school:SBOA">
      3                           <DETAILS>
      4                           <NAME>KUMAR</NAME>
      5                           <CLASS>10</CLASS>
      6                           <SECTION>A</SECTION>
      7                           </DETAILS>
      8                          </STAFF>') xml_col
      9             FROM dual)
    10  SELECT s.name
    11  FROM t, xmltable('$x//*:NAME[text()="KUMAR"]'
    12                   PASSING t.xml_col AS "x" COLUMNS name VARCHAR2(10) PATH '.') s;
    NAME
    KUMAR
    Elapsed: 00:00:00.72Ants

Maybe you are looking for

  • Family Sharing and iTunes for Windows

    My wife and I have family sharing set up and working fine across iOS devices and my macs.  She uses iTunes for windows and we can't find how to access my purchases on her machine.  We looked in the same place it is in iTunes for Mac and there is no p

  • The network path was not found

    we have a windows server 2012 R2 as file server and we access the share location with DFS however while accessing the file from share location sometimes the below error comes however after sometime again the error vanishes and the user is able to acc

  • Days of Music

    I downloaded the latest version of Itunes, 7.3.2.6 I have noticed that where it used to say approx 11. whatever days of music at the bottom, it is now showing 373.2 days and even I know this is impossible on a 30gig Ipod! Whilst it is not imperative

  • G/L Account currency is not consistent  with G/L Interim Account currency

    Hello A few days ago I was  printing checks and suddenly an error occurs it says something like..."Another user is accessing the same account" In the reserch   I found help in SAP Portal, where I showed how to unlock this part This I did in Administr

  • How to display name in the posting rather than number

    Hello All, I want my name to be dispayed instead of 403868, what should I do? Regards