cannot load XML with DOCTYPE -ORA-31011: XML parsing failed
245460Sep 1 2006 — edited Oct 8 2006Hello,
I have been through the forum and the faq but cannot find a solution to my problem. And I am new to XML and XDB.
I have a XML document containing DOCTYPE and ENTITIES that must be validated against a XML Schema.
Registering schema was successful. Then I try to load XML (through insert or FTP) and it fails with
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00247: invalid Document Type Declaration (DTD)
Error at line 24
ORA-06512: at "SYS.XDBURITYPE", line 30
ORA-06512: at line 1
However, opening the XML in IE (v.6), copy the parsed XML, it gets loaded successfully in the DB. And opening the XML in JDeveloper does not mention any errors.
It looks like IE parser is substituting all text starting with & with a value from the DOCTYPE.
Any clue of what I should be doing before loading the doc ?
Best regards,
Lalaina
Here's the XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE FlightDescription [
<!ENTITY todposition " <Position type='Distance from XY'>
<Distance units='nmi'> 58 </Distance>
<PositionX units='nmi'> 402.022 </PositionX>
<PositionY units='nmi'> 514.858 </PositionY>
</Position> ">
<!ENTITY descentCAS "200">
<!ENTITY crossingaltitude "16000">
<!ENTITY crossingCAS "200">
<!ENTITY mfposition " <Position type='XY'>
<PositionX units='nmi'> 437.515 </PositionX>
<PositionY units='nmi'> 434.103 </PositionY>
</Position> ">
<!ENTITY Turn1turnpoint " <TurnPoint>
<Name> 1 </Name>
<Position type='XY'>
<PositionX units='nmi'> 424.76 </PositionX>
<PositionY units='nmi'> 449.74 </PositionY>
</Position>
<InboundCourse type='true' units='degrees'> 161.48 </InboundCourse>
<OutboundCourse type='true' units='degrees'> 140.76 </OutboundCourse>
</TurnPoint> ">
] >
<FlightDescription
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:noNamespaceSchemaLocation="nasa_flight_desc.xsd"
tpmlVersion="1.0" equipType="TURBOPROP" runId="1995 Run 3" acType="E120" source="NASA">
<Profile type="Speed">
<Segment at="Initial Condition">
<Capture category="AT" name="TOD" type="Position">
&todposition;
</Capture>
<Method>
<SegmentType>
ConstCAS
</SegmentType>
<Parameter type="implicit">
CurrentCAS
</Parameter>
</Method>
</Segment>
<Segment at="TOD">
<Capture category="AT" name="Captured Descent CAS" type="CAS" units="knots">
&descentCAS;
</Capture>
<Method>
<SegmentType>
Accel
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="Captured Descent CAS">
<Capture category="AT" name="BOD" parametertype="altimeter" type="Altitude" units="feet">
&crossingaltitude;
</Capture>
<Method>
<SegmentType>
ConstCAS
</SegmentType>
<Parameter type="explicit" units="knots">
&descentCAS;
</Parameter>
</Method>
</Segment>
<Segment at="BOD">
<Capture category="ATORBELOW" name="End Decel" type="CAS" units="knots">
&crossingCAS;
</Capture>
<Method>
<SegmentType>
Decel
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="End Decel">
<Capture category="AT" name="Meter Fix" type="Position">
&mfposition;
</Capture>
<Method>
<SegmentType>
ConstCAS
</SegmentType>
<Parameter type="explicit" units="knots">
&crossingCAS;
</Parameter>
</Method>
</Segment>
</Profile>
<Profile type="Altitude">
<Segment at="Initial Condition">
<Capture category="AT" name="TOD" type="Position">
&todposition;
</Capture>
<Method>
<SegmentType>
ConstAltitude
</SegmentType>
<Parameter type="implicit">
CurrentAltitude
</Parameter>
</Method>
</Segment>
<Segment at="TOD">
<Capture category="AT" name="BOD" parametertype="altimeter" type="Altitude" units="feet">
&crossingaltitude;
</Capture>
<Method>
<SegmentType>
ConstantFlightPathRatio
</SegmentType>
<Parameter type="explicit" units="nmi:feet">
3:1000
</Parameter>
</Method>
</Segment>
<Segment at="BOD">
<Capture category="AT" name="Meter Fix" type="Position">
&mfposition;
</Capture>
<Method>
<SegmentType>
ConstAltitude
</SegmentType>
<Parameter parametertype="altimeter" type="explicit" units="feet">
&crossingaltitude;
</Parameter>
</Method>
</Segment>
</Profile>
<Profile type="Thrust">
<Segment at="Initial Condition">
<Capture category="AT" name="TOD" type="Position">
&todposition;
</Capture>
<Method>
<SegmentType>
CruiseThrust
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="TOD">
<Capture category="AT" name="Captured Descent CAS" type="CAS" units="knots">
&descentCAS;
</Capture>
<Method>
<SegmentType>
MaxThrust
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="Captured Descent CAS">
<Capture category="AT" name="BOD" parametertype="altimeter" type="Altitude" units="feet">
&crossingaltitude;
</Capture>
<Method>
<SegmentType>
DescentThrust
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="BOD">
<Capture category="ATORBELOW" name="End Decel" type="CAS" units="knots">
&crossingCAS;
</Capture>
<Method>
<SegmentType>
MinThrust
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
<Segment at="End Decel">
<Capture category="AT" name="Meter Fix" type="Position">
&mfposition;
</Capture>
<Method>
<SegmentType>
CruiseThrust
</SegmentType>
<Parameter>
</Parameter>
</Method>
</Segment>
</Profile>
<Profile type="Lateral">
<Segment at="Initial Condition">
<Capture category="FLYBY" name="Turn 1 Turn Start" type="Turn Enter">
&Turn1turnpoint;
</Capture>
<Method>
<SegmentType>
TrackToFix
</SegmentType>
<Parameter type="explicit">
&Turn1turnpoint;
</Parameter>
</Method>
</Segment>
<Segment at="Turn 1 Turn Start">
<Capture category="FLYBY" name="Turn 1 Turn End" type="Turn Exit">
&Turn1turnpoint;
</Capture>
<Method>
<SegmentType>
FlyByTurn
</SegmentType>
<Parameter type="explicit">
&Turn1turnpoint;
</Parameter>
</Method>
</Segment>
<Segment at="Turn 1 Turn End">
<Capture category="AT" name="Meter Fix" type="Position">
&mfposition;
</Capture>
<Method>
<SegmentType>
TrackToFix
</SegmentType>
<Parameter type="explicit">
&mfposition;
</Parameter>
</Method>
</Segment>
</Profile>
</FlightDescription>