xsl-list
[Top] [All Lists]

RE: Transform XML to DXL using XSLT

2006-03-02 09:08:06
Now I am stuck with a new problem and I am not able to find 
any solution for it.

If this is a new problem, then I wonder what problems you've been tackling
until now. This is about as classic a one-to-one transformation as they
come.

I want to use XSLT to transform XML file to DXL (Domino XML) file. Dxl
file is also a xml file used by Lotus Notes.
For example what could be the xslt for converting document A 
into document B.

<xsl:template match="ItemList">
<documents>
  <document>
    <xsl:apply-templates/>
  </document>
</documents>
</xsl:template>

<xsl:template match="Level">
  <item name="Level"><text><xsl:value-of select="."/></item>
</xsl:template>

<xsl:template match="PartNumber">
  <item name="PartNumber"><text><xsl:value-of select="."/></item>
</xsl:template>

Michael Kay
http://www.saxonica.com/


Document A:

<ItemList>
        <Level>Level 1</Level>
        <PartNumber>987654321</PartNumber>
</ItemList>

Document B:

<documents>
    <document>
        <item name="Level"><text>Level 1</text></item>
        <item name="PartNumber"><text>987654321</text></item>
    </document>
</documents>

Thanks in advance.

Cheers,
Rob

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>