This discussion is archived
2 Replies Latest reply: Jul 3, 2013 3:46 PM by Mark Kelly RSS

DBMS_PREDICTIVE_ANALYTICS.PROFILE

Brendan Oracle ACE Director
Currently Being Moderated

Hi

The documentation for the PROFILE procedure gives the following xsd

 

 

<xs:element name="SimpleRule">

<xs:complexType>

<xs:sequence>

<xs:group ref="PREDICATE"/>

<xs:element ref="ScoreDistribution" minOccurs="0" maxOccurs="unbounded"/>

</xs:sequence>

<xs:attribute name="id" type="xs:string" use="optional"/>

<xs:attribute name="score" type="xs:string" use="required"/>

<xs:attribute name="recordCount" type="NUMBER" use="optional"/>

</xs:complexType>

</xs:element>

 

 

what namespace should be used? I cannot find in the documentation what namespace to use.

 

 

No details are provided on how this xsd should be used so that the query of the result table can return the XML data.

 

 

I've used the following but I get the following error

 

 

DECLARE

  doc varchar2(2000) := '<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb">

        <xs:element name="SimpleRule">

          <xs:complexType>

            <xs:sequence>

              <xs:group ref="PREDICATE"/>

              <xs:element ref="ScoreDistribution" minOccurs="0" maxOccurs="unbounded"/>

            </xs:sequence>

            <xs:attribute name="id" type="xs:string" use="optional"/>

            <xs:attribute name="score" type="xs:string" use="required"/>

            <xs:attribute name="recordCount" type="NUMBER" use="optional"/>

          </xs:complexType>

        </xs:element>

      </xs:schema>';

BEGIN

-- use the pl/sql package to register the schema

dbms_xmlschema.registerSchema('http://otn.oracle.com/SimpleRule.xsd', doc);

END;

 

 

DECLARE

*

ERROR at line 1:

ORA-31154: invalid XML document

ORA-19202: Error occurred in XML processing

LSX-00025: unknown group "PREDICATE"

ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3

ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14

ORA-06512: at line 17

 

 

 

 

Any suggestions?