[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] XML into a database
- From: "Stephen Green" <stephengreenubl@gmail.com>
- To: "David Bradley" <dave@globe-media.com>
- Date: Tue, 12 Jun 2007 22:00:16 +0100
Hi David
What the tools allow is to create an XSLT version of the mapping.
This is handy because you can then hand-edit the XSLT and learn
some XSLT in the process.
I don't have your database schema (and best to take such detail
off-list) but the XSLT I get looks like this when you just map the
instance to itself
...
<xsl:for-each select="attributes">
...
<xsl:for-each select="attribute">
...
<xsl:for-each select="attribute-name">
...
Without getting into detail it seems, superficially, you need to duplicate
the XSLT related to 'attribute' and then specialise the XPath of each to
refer in one case to the 'attribute' element with a child 'attribute-name'
equal to 'CountryName' and in the other case to the 'attribute' element
(how I hate this giving an element the name 'attribute :-) with a child
'attribute-name' equal to 'CountryCode'. Hopefully that should do it but
it needs some care and there may be a few other things like this you'll
want to do too.
By the way, I notice the tool warns you that changes like this will be
lost on regeneration of the XSLT but personally I'd just choose the
pragmatic approach and accept that you'll have to do the changes
again if you regenerate the XSLT (which maybe you won't have to do
once you learn to write it manually with the tool's help).
All the best
Stephen Green
Partner
SystML, http://www.systml.co.uk
Tel: +44 (0) 117 9541606
http://www.biblegateway.com/passage/?search=matthew+22:37 .. and voice
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]