set long 100000
set echo on
--
select object_value
  from IMAGE_METADATA_TABLE m, RESOURCE_VIEW r
 where m.RESID = r.RESID
   and equals_path(res,'/home/%USER%/ImageLibrary/Norwich (3).jpg') = 1
/
update IMAGE_METADATA_TABLE m
   set object_value = insertChildXML
                      (
                         object_value, 
                         '/imageMetadata',
                         'Title',
                         xmltype('<Title xmlns="http://xmlns.oracle.com/demo/imageMetadata">Norwich Catherdral from Ethelbert Gate</Title>'),
                         'xmlns="http://xmlns.oracle.com/demo/imageMetadata"'
                      )
 where m.RESID =  
       (
         select RESID 
           from RESOURCE_VIEW
          where equals_path(res,'/home/%USER%/ImageLibrary/Norwich (3).jpg') = 1
       )
/
declare
   narrative XMLTYPE := xmlType( 
'<img:Description xmlns:img="http://xmlns.oracle.com/demo/imageMetadata" xmlns="http://www.w3.org/1999/xhtml">
<p>In the heart of Norwich stands the Cathedral, separated from the busy streets 
by flint walls and entrance gates, but still a living part of the city. At least 
three services are held in the Cathedral every day, often sung by the choir. The 
choristers are pupils of King Edward VI School, which has its daily assembly in 
the Cathedral. Concerts, lectures and exhibitions also frequently take place 
here.<br/>
<br/>
The Cathedral was begun in 1096, the vision of Herbert de Losinga, first bishop 
of Norwich. Building work on the Cathedral, a bishop&apos;s palace and the 
associated Benedictine monastery continued throughout his life, but the 
Cathedral was not finally consecrated until 1278. The building is mainly of Caen 
stone, a pale, honey-coloured limestone brought over from Normandy, but Norfolk 
flints form the core of the Cathedral, and stone from Northamptonshire was used 
for medieval additions.<br/>
<br/>
This great church has a Norman ground plan and walls, and a Perpendicular roof 
and spire, added after a fire caused by lightning destroyed the wooden roof and 
spire in 1463. The Cathedral spire is 315 ft (96m) high - second only in height 
to that of Salisbury.</p>
</img:Description>');
begin
  update IMAGE_METADATA_TABLE m
     set object_value = insertChildXML
                        (
                           object_value, 
                           '/img:imageMetadata',
                           'img:Description',
                           narrative,
                           'xmlns:img="http://xmlns.oracle.com/demo/imageMetadata"'
                       )
 where m.RESID =  
       (
         select RESID 
           from RESOURCE_VIEW
          where equals_path(res,'/home/%USER%/ImageLibrary/Norwich (3).jpg') = 1
       );
end;
/
select object_value
  from IMAGE_METADATA_TABLE m, RESOURCE_VIEW r
 where m.RESID = r.RESID
   and equals_path(res,'/home/%USER%/ImageLibrary/Norwich (3).jpg') = 1
/
--
pause
--
update IMAGE_METADATA_TABLE m
   set object_value = insertChildXML
                      (
                         object_value, 
                         '/imageMetadata',
                         'Title',
                         xmltype('<Title xmlns="http://xmlns.oracle.com/demo/imageMetadata">Concorde From the Concorde Lounge at British Airways Terminal 1</Title>'),
                         'xmlns="http://xmlns.oracle.com/demo/imageMetadata"'
                      )
 where m.RESID =  
       (
         select RESID 
           from RESOURCE_VIEW
          where equals_path(res,'/home/%USER%/ImageLibrary/Concorde.jpg') = 1
       )
/
--
declare
  narrative XMLTYPE := xmlType( 
'<img:Description xmlns:img="http://xmlns.oracle.com/demo/imageMetadata" xmlns="http://www.w3.org/1999/xhtml">
<p>Concorde measures 204ft in length - stretching between six and ten inches 
in-flight due to heating of the airframe. She is painted in a specially 
developed white paint to accommodate these changes and to dissipate the heat 
generated by supersonic flight. The wingspan is 83ft 8ins - much less than 
conventional subsonic aircraft as Concorde flies in totally a different way 
using &apos;Vortex Lift&apos; to achieve her exceptional performance. The height is 37ft 
1ins. The characteristic droop nose is lowered to improve pilots&apos; visibility 
for take-off and landing.<br/>
Power: Concorde&apos;s four engines - specially designed Rolls-Royce/ Snecma Olympus 
593s - give more than 38,000lbs of thrust each, with &apos;reheat&apos;. This adds fuel 
to the final stage of the engine to produce the extra power required for 
take-off and the transition to supersonic flight. They are the most powerful 
pure jet engines flying commercially.<br/>
Speed: Concorde takes off at 220 knots (250mph) (compared with 165 knots for 
most subsonic aircraft). She cruises at around 1350mph - more than twice the 
speed of sound - and at an altitude of up to 60,000 ft (over 11 miles high). A 
typical London to New York crossing takes a little less than three and a half 
hours as opposed to about eight hours for a subsonic flight. Travelling 
Westwards, the five-hour time difference means Concorde effectively arrives 
before she has taken off. She travels &apos;faster than the sun&apos;.<br />
Service: More than 2.5 million passengers have flown supersonically on British 
Airways&apos; Concorde since she entered commercial service in 1976. The most 
frequent passenger, an oil company executive, has clocked up almost 70 round 
trip transatlantic crossings a year.<br/>
Safety Enhancements: A team of about 250 British Airways&apos; engineers worked 
tirelessly, together with the relevant authorities, to further improve safety on 
board. The engineers and manufacturers have worked closely together to create 
and install a new Kevlar-rubber lining for Concorde&apos;s wing-based fuel tanks and 
the addition of specially developed Michelin tires, as well as strengthened 
wiring in the undercarriage.<br/>
History: Supersonic airline research in Europe began in 1956 and resulted in the 
British and French Governments signing an international treaty for the joint 
design, development and manufacture of a supersonic airliner six years later. 
The first prototype was rolled out at Toulouse in 1967 and since then, there 
have been a number of notable dates in the history of Concorde.<br/>
</p>
<ul>
<li>2 March 1969: First flight of Concorde 001 from Toulouse France.</li>
<li>9 April 1969: First flight of Concorde 002 from Filton, Bristol, UK to its test centre at Fairford.</li>
<li>1 October 1969: Concorde&apos;s first supersonic flight.</li>
<li>28 June 1972: British Airways (BOAC) orders five Concordes.</li>
<li>20 September 1973: Concorde 002 lands at Dallas/ Fort Worth on first visit to the USA.</li>
<li>7 June 1974: Concorde makes its first double Atlantic crossing in one day.</li>
<li>5 December 1975: UK Civil Aviation Authority awards Concorde its Certificate of Airworthiness.</li>
<li>21 January 1976: British Airways commences commercial supersonic travel from London to Bahrain.</li>
<li>22 November 1977: British Airways Concorde&apos;s first London - New York commercial flight.</li>
<li>8 November 1986: First round the world flight by a British Airways Concorde - covering 28,238 miles in 29 hours 59 minutes.</li>
<li>7 February 1996: Concorde G-BOAD crosses the Atlantic between New York and London in a new record flight time of 2 hours, 52 minutes and 59 seconds.</li>
<li>11 August 1999: Two British Airways Concordes fly in supersonic formation to chase the total eclipse of the sun.</li>
</ul>
</img:Description>');
begin
  update IMAGE_METADATA_TABLE m
     set object_value = insertChildXML
                        (
                           object_value, 
                           '/img:imageMetadata',
                           'img:Description',
                           narrative,
                           'xmlns:img="http://xmlns.oracle.com/demo/imageMetadata"'
                       )
   where m.RESID =  
         (
           select RESID 
             from RESOURCE_VIEW
            where equals_path(res,'/home/%USER%/ImageLibrary/Concorde.jpg') = 1
         );
end;
/
select object_value
  from IMAGE_METADATA_TABLE i, RESOURCE_VIEW r
 where i.RESID = r.RESID 
   and equals_path(res,'/home/%USER%/ImageLibrary/Concorde.jpg') = 1
/
--
quit

