We are importing XML documents into Notes. The import is working except that the RTF (“docBody” in XML & “WebPageBody” in Notes) is missing in the DXL file, which, of course, means that it’s missing in the document. The other fields all import okay.
We are not getting any errors from the tranformer’s.log, the field is missing from the dxl. Since the XML importer is not yet involved, the issue has been determined to be in the translation from XML to DSL. In addition, running the same process in Altova’s XMLSpy tool shows the same behavior. It just skips the template select=docBody line during the step-by-step debug. It also just left RTF out of the resulting DXL. The problem is the template line for docBody.
We have included the pertainent portions of the script code, the xml code, and the xsl code. We are using the domino.dtd from the server.
As we have been unable to find the solution, we would greatly appreciate any assistance from those who have done a RTF export & import with Domino.
Thanks in advance,
Tripp
LS Code Excerpt:
’ set stylesheet stream now. it is same file throughout import …
Set xslStream=s.CreateStream() ’ transforming XSL stream
’ attempt to open xsl/ss stream (transformer’s “style-sheet” - 2nd parameter)
If Not (xslStream.Open(dxlfilepath & xslfilenm)) Then
' unable to open dxl/xml stream, log error, skip to stream close
…
…
End If
’ create stream for importing DXL files to Notes Docs
Set xmlStream=s.CreateStream() ’ source (1st) xml stream
Set dxlStream=s.CreateStream() ’ middle (2nd) dxl stream
’ attempt to open xml stream (transformer’s “input” - 1st parameter)
If Not (xmlStream.Open(xmlinputpath & curfilename)) Then
’ unable to open xml stream, log error
…
…
End If
…
If Not (dxlStream.Open(dxlfilepath & dxlfilename)) Then
' unable to open dxl/xml stream, log error
…
…
End If
’ delete out any current contents (we are not appending)
Call dxlStream.Truncate
’ using transformer, input into current db as new notes
Set xmlImporter = s.CreateDXLImporter(dxlStream, db)
xmlImporter.InputValidationOption = 1 ’ Validate against DTD
’ setup transformer
'Set xmlTransformer=s.CreateXSLTransformer(xmlStream, xslStream, xmlImporter)
Set xmlTransformer=s.CreateXSLTransformer(xmlStream, xslStream, dxlStream)
xmlTransformer.Process
'Call xmlImporter.Process()
…
Code - XSL Stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?><xsl:stylesheet xmlns:xsl=“XSLT Namespace” version=“1.0”
xmlns:dxl=“http://www.lotus.com/dxl” exclude-result-prefixes=“dxl”>
<xsl:output method=“xml” indent=“yes” doctype-system=“c:/Lotus/lotusXML/domino.dtd” />
<xsl:template match="/document">
<document version='1.01' form='WebPage'>
<xsl:apply-templates select = "docTitle" />
<xsl:apply-templates select = "docBody" />
</document>
</xsl:template>
<xsl:template match=“docTitle”>
<text><xsl:value-of select="@Value"/></text>
</xsl:template>
<xsl:template match=“docBody”>
<xsl:copy-of select="."/>
</xsl:template>
<!-- -->
</xsl:stylesheet>
Code - XML Source File
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="http://www.acme.com/aptrix.xsl"?><docBody name=“WebPageBody” seal=“false” sign=“false” names=“false” sealed=“false” authors=“false”
readers=“false” placeholder=“false” xmlns=“http://www.lotus.com/dxl”>
<pardef id=“1” list=“none” align=“left” newpage=“false” leftmargin=“1.1250in” spaceafter=“1”
linespacing=“1” rightmargin=“100%” spacebefore=“1” readingorder=“lefttoright”/>
Intro
Line of Body Text
A paragraph of text
describing the wonderful stuff we have and do.
<pardef id=“2” list=“none” align=“left” newpage=“false” leftmargin=“1in” spaceafter=“1”
linespacing=“1” rightmargin=“100%” spacebefore=“1” readingorder=“lefttoright”/>
The second and last
paragraph of text.