[Openroad-users] Importing XML files into Ingres/OpenROAD

Kim Ginnerup kgi at bording.dk
Tue Nov 14 22:48:26 EST 2006


Martin,

 

And here it is:

 

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

 <xsl:output method="xml" version="1.0" encoding="ISO-8859-1"
indent="yes"/>

 <xsl:strip-space elements="*"/>

 <xsl:template match="*">

  <xsl:copy>

   <xsl:if test="@*">

    <xsl:for-each select="@*">

     <xsl:element name="{name()}">

      <xsl:value-of select="."/>

     </xsl:element>

    </xsl:for-each>

   </xsl:if>

   <xsl:apply-templates/>

  </xsl:copy>

 </xsl:template>

</xsl:stylesheet

 

 

 

Regards,

 

Kim

________________________________

Fra: Bloomfield, Martin (PSD)
[mailto:Martin.Bloomfield at psd.defra.gsi.gov.uk] 
Sendt: 14. november 2006 11:29
Til: Kim Ginnerup
Emne: RE: [Openroad-users] Importing XML files into Ingres/OpenROAD

 

Kim,

 

As I am new to XML, I would be extremely grateful if you are able to
send me the XSL script, as in my attempts to create an XSD, I've
discovered that unique rules only seem to work on attributes, so have
had to put the unique identifiers into attributes.  Obviously, I need to
import these into the database, so will need to convert them to
elements.

 

Many thanks,

Martin Bloomfield. 
____________________________________________ 
Application Developer & Database Administrator 
IT Branch, 
Pesticides Safety Directorate 
YORK 

Email: martin.bloomfield at psd.defra.gsi.gov.uk
<mailto:martin.bloomfield at psd.defra.gsi.gov.uk>  
Website: www.pesticides.gov.uk <http://www.pesticides.gov.uk/>  

	-----Original Message-----
	From: openroad-users-bounces at peerlessit.com
[mailto:openroad-users-bounces at peerlessit.com] On Behalf Of Kim Ginnerup
	Sent: Tuesday, November 14, 2006 5:31 AM
	To: openroad-users at peerlessit.com
	Subject: Re: [Openroad-users] Importing XML files into
Ingres/OpenROAD

	I forgot to mention

	OpenROAD only reads elements from an xml-file all attributes are
ignored.

	But you can make a very simple generic XSL-script that change
all attributes to elements.

	Put that transformation into iixmlpreprocess using msxml.

	 

	I have such a script somewhere if you are interested I think it
is less than 10 lines of xsl.

	 

	Kim

	 

Department for Environment, Food and Rural Affairs (Defra)
 
This email and any attachments is intended for the named recipient only.
If you have received it in error you have no authority to use, disclose,
store or copy any of its contents and you should destroy it and inform
the sender.
Whilst this email and associated attachments will have been checked
for known viruses whilst within Defra systems we can accept no
responsibility once it has left our systems.
Communications on Defra's computer systems may be monitored and/or
recorded to secure the effective operation of the system and for other
lawful purposes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://peerlessit.com/pipermail/openroad-users/attachments/20061114/f5a5bcf1/attachment-0001.html 


More information about the Openroad-users mailing list