<?vsp 
--  
--  $Id$
--  
--  This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
--  project.
--  
--  Copyright (C) 1998-2018 OpenLink Software
--  
--  This project is free software; you can redistribute it and/or modify it
--  under the terms of the GNU General Public License as published by the
--  Free Software Foundation; only version 2 of the License, dated June 1991.
--  
--  This program is distributed in the hope that it will be useful, but
--  WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--  General Public License for more details.
--  
--  You should have received a copy of the GNU General Public License along
--  with this program; if not, write to the Free Software Foundation, Inc.,
--  51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
--  
--  
?>
<html>
<head>
</head>
<body>
<h3>Yahoo Maps API POST sample</h3>
<form method="POST" name="YahooMapsRequestForm" action="http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps">
<label for="appid">ApplicationID</label><input type="test" id="appid" name="appid" value="YahooDemo"/>
<textarea type="hidden" id="xmlsrc" name="xmlsrc" rows="20" cols="70">
<?vsp 
  declare ses any;
  ses := string_output ();

  xml_auto('select top 1
              1 as tag,
              null as parent,
              \'2.0\' as [rss!1!version],
              \'http://www.w3.org/2003/01/geo/wgs84_pos#\' as [rss!1!"xmlns:geo"],
              \'http://api.maps.yahoo.com/Maps/V1/AnnotatedMaps.xsd\' as [rss!1!"xmlns:ymaps"],
              null as [channel!2!title!element],
              null as [channel!2!link!element],
              null as [channel!2!description!element],
              null as [item!3!title!element],
              null as [item!3!link!element],
              null as [item!3!description!element],
              null as [item!3!ymaps:Address!element],
              null as [item!3!ymaps:CityState!element],
              null as [item!3!ymaps:Zip!element],
              null as [item!3!ymaps:PhoneNumber!element]
              from SYS_KEYS
        union all
          select top 1
              2,
              1,
              null,null,null,\'Yahoo Maps API Demo\',\'\',\'Yahoo Maps API Demo\',
              null,null,null,null,null,null,null
              from SYS_KEYS
        union all
          select 
              3,
              2,
              null,null,null,null,null,null,
              ContactName,\'\',\'Company: \'|| CompanyName,Address,City|| \', \' || Region, PostalCode, Phone
              from Demo.demo.Customers 
          where country = \'USA\'
          for xml explicit',vector(),ses);
    http_value(ses,null);

 ?>
</textarea>
<input type="submit" value="Post"/>
</form>

</body>
</html>
