notes/xml
Jetpak is Public
Created By: reidr
Last Modified: 08/23/07

XML/DOCTYPE

I've written some LotusScript code that transforms some external XML to DXL, then imports the DXL using a NotesXSLTransformer object. I'd like to validate the DXL during the XSL transformation process. In order for the NotesXSLTransformer to validate teh DXL, it must already include a statement like this:



However, I can't find a way to insert a DOCTYPE statement into the DXL after its been created by the NotesXSLTransformer object. In Java, I can easily specify a DOCTYPE for the transformation by using:

javax.xml.transform.Transformer.setOutputProperty ( OutputKeys.DOCTYPE_SYSTEM, "c:/notes6/xmlschemas/domino_6_5_4.dtd" );

Does anyone have a way to do this using the LotusScript XML classes?

1. comment posted by Mikkel Heisterberg04/08/2006 06:05:26 PM
Homepage: http://blog.lekkim.heisterberg.dk


To set the doctype (and encoding for that matter) in the XML document that results from a XSLT transformation use the tag in the stylesheet. For an example you can look at the below link (especially page 2).

http://www.xml.com/pub/a/2002/09/04/xslt.html

Hope it helps you.

/lekkim




2. comment posted by Michael Sobczak04/08/2006 07:32:53 PM
Homepage: http://www.punkdbynotes.com


Hi Mikkel,

I found another way to do this. Your's is probably the correct way, whereas mine is more of a hack. I put the DOCTYPE declaration in my stylesheet's initial "template match" node, like this:



]]>

version='6.5' replicaid='85257102000158A5'>



1






3. comment posted by Mikkel Heisterberg04/09/2006 02:41:33 AM
Homepage: http://blog.lekkim.heisterberg.dk


Yes it's kind of a hack but if it ain't broken...


From: http://ww2.nutechs.com/hosting/msobczak/Blogs/BlogSphere-1_0_2/LordLotusBlog.nsf/d6plinks/MSOK-6NNLZ9

Nigel's forum post on DXL/XSL

Yes, the transformation is done by pipelining the output from the DXL export straight into a Transformer object. I use the output XML to create a set of field descriptors which I then use to populate a 'Form Descriptor' document. This is used later in the application to drive some XML output into a Windows COM object.

From: http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllThreadedweb/2255a74780d302718525734000634a63?OpenDocument

XML classes in Notes

LotusScript: XML classes in Notes/Domino 6

developerWorks
Document options

Document options requiring JavaScript are not displayed

Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page


developerWorks spaces

More options, more ways to get involved (coming soon)


Rate this page

Help us improve this content


Level: Intermediate

Sally Blanning DeJean (ddejean@dejean.com), CLP Principal, DeJean & Clemens
David DeJean (ddejean@dejean.com), Partner, DeJeans & Clemens

03 Feb 2003

Part 2 of 5: This article, fourth in a series on new classes and enhancements to LotusScript in Notes/Domino 6, looks at new LotusScript classes for exporting, importing, and processing XML data, with example code.

Notes/Domino 6 consolidates support for XML by adding several new LotusScript classes for exporting, importing, and processing XML data. This article begins a closer look at these new classes and provides some useful code examples for exporting data selectively from an NSF file in DXL format, the Domino XML language, and for applying the two parsers supported in LotusScript, the DOM parser and the SAX parser. A future article will continue with examples of applying an XSL transform to turn DXL into other XML dialects, especially HTML, and importing XML data into NSF format. (This is the second of a series of articles that take a close look at the new LotusScript classes and enhancements to the LotusScript language in Notes/Domino 6. The first dealt with the new LotusScript classes for manipulating rich text elements. See the LDD Today article, "LotusScript: Rich text objects in Notes/Domino 6.")


From: http://www.ibm.com/developerworks/lotus/library/ls-LS_XML1/

Using AJAX to manipulate Notes docs

Using Ajax to manipulate Lotus Notes documents

developerWorks
Document options

Document options requiring JavaScript are not displayed

Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page

Discuss

Sample code


developerWorks spaces

More options, more ways to get involved (coming soon)


Rate this page

Help us improve this content


Level: Intermediate

Joachim Dagerot (jd@dagerot.com), System Architect and Technical Lead, Strand Interconnect

06 Jun 2006
Updated 07 Jun 2006

Giving users instant feedback instead of the time-consuming page reloads they’re used to is simple when you use Ajax. Discover how a view and an agent can help you build Ajax-driven applications and learn how to define an API for getting the client and the Domino server to collaborate.

From: http://www-128.ibm.com/developerworks/lotus/library/domino-ajax/

XML+Domino book

XML Powered by Domino How to use XML with Lotus Domino



Download PDF (2.9 MB)


Get Adobe® Reader®


Additional Material


View as HTML


Tips for viewing


Order Hardcopy


Abstract

XML, the extensible markup language, is the emerging standard for exchanging information between disparate systems. This simple yet powerful technology has many uses in Notes and Domino business applications. This redbook will help you understand XML and how to use it on a Domino platform.

In this IBM Redbook, we start with an introduction to XML, and describe its history, syntax, and related tools. We then describe how you can get information out of Domino in an XML format using tools you are already familiar with, such as views, forms, pages, and agents.

Once XML data is extracted from Domino, we show how it can be transformed into other formats, like HTML, text, or other XML formats. Finally, we describe how to get data that is already in an XML format into Domino using agents and the Lotus XML toolkit.


From: http://www.redbooks.ibm.com/abstracts/SG246207.html?Open

More DXL

DXL roadmap: Understanding Domino's XML language

developerWorks
Document options

Document options requiring JavaScript are not displayed

Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page


developerWorks spaces

More options, more ways to get involved (coming soon)


Rate this page

Help us improve this content


Level: Intermediate

Russ Lipton (russ@russ.com), Notes Developer, IBM

01 Oct 2001

This article offers an overview of XML in the context of R5, the Lotus XML Toolkit, and Domino Rnext. It looks at the parts of XML for Domino -- the Domino DTD and DXL (Domino XML Language), the Lotus XML Toolkit, and XSLT -- and the Rnext roadmap.

XML (eXtended Markup Language) has become an industry-standard meta-language for data modeling and presentation. DXL (Domino XML Language) is Domino data expressed as XML. With it, you can conveniently import, export, work with, and transform the data in your Notes databases. Today's Lotus XML Toolkit Release 1.0 and tomorrow's Domino Rnext capabilities solidify Domino's role as a strategic data integration point within your organization.

This article offers an overview of XML and DXL in the context of R5, the Lotus XML Toolkit, and Domino Rnext. While XML and DXL will be moving targets for the next few years, both are stable enough to support a wide range of prototyping as well as production application development.

This article assumes you are an experienced Lotus Notes/Domino developer with a basic working knowledge of XML. Proficiency in Java and C++ will be a definite help. Also, a several online resources are provided at the end of the article to help you ramp up your XML skills so that you can take advantage of DXL.


From: http://www-128.ibm.com/developerworks/lotus/library/ls-DXL_roadmap/

DXL intro beginning:

Lotus Domino and IBM WebSphere integration solutions: Domino XML

developerWorks
Document options

Document options requiring JavaScript are not displayed

Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page

Sample code


developerWorks spaces

More options, more ways to get involved (coming soon)


Rate this page

Help us improve this content


Level: Introductory

Jeffrey Lo, Advisory Software Engineer, IBM Corporation

01 Mar 2005

Manage your data in Lotus Domino, but take advantage of IBM WebSphere's highly scalable, transactional J2EE platform using one of these solutions: Domino XML or Domino JSP tag libraries. In part one of this series, we focus on Domino XML or DXL.

Many organizations find that the next logical move for their Domino Web applications is to integrate them with IBM WebSphere software. And they are doing so for good reasons. Lotus Domino's document-based architecture makes it easy to create and share documents between content creators and editors. Its built-in security and versioning capabilities are ideal for administering document-based content.


From: http://www.ibm.com/developerworks/lotus/library/dwintegration-dxl/

DXL intro

Examining the DXL

Now browse to C:\article\dxl\ and open a newly created DXL file (the extension is still XML) in your favorite text editor or browser. Let's examine its structure and contents.


Figure 3. Generated DXL opened in a browser
Generated DXL opened in a browser

DXL is designed to represent Domino elements in a tree-like, hierarchical structure. It is constrained by the Domino DTD which describes each element in terms of the Domino construct. Because of that, a DXL document is usually not semantically meaningful for your data. Consider this from the car example: Suppose that there is a text field called VIN that stores an alphanumeric value in the Domino document. The exported DXL representation of this field is:

9135D30E168BEC6688256F0D00626201

While this is valid XML, it does not represent the true meaning of a vehicle identification number, the unique ID of a car. In fact, the VIN is represented no differently than any other text fields in the document. It is up to the developer to transform a DXL document into an XML file that is semantically sound. For maximum portability, we recommend transforming the DXL document to an XML fil


From: http://www.ibm.com/developerworks/lotus/library/dwintegration-dxl/




ADVERTISING