xsl-list
[Top] [All Lists]

Documenting XML -and- viewing an XML tree in IE

2003-03-17 06:00:34
I'm looking for advice on:

- How to manipulate IE's default ("internal"?) XSLT stylesheet (that it uses
to display .xml files that don't refer to XSLT files).

- The best way to document an XML schema/DTD, and present that documentation
(via XSLT) in XHTML.

Specifically:

I've been given a couple of MS Word documents that are intended to help
users edit a particular XML file.

One document contains several screen captures from MS XML Notepad. Each
screen capture shows a portion of an example XML file.  Below each screen
capture is a list that describes the major XML elements and attributes in
the screen capture, and their possible values.

The other document contains a table of all of the elements, attributes, and
their possible values. (So there's some duplication between these two
documents.)

My job is to convert these Word documents to XHTML (for presentation inside
a .chm, and viewed over the Web - in MS Internet Explorer only - and also
for XHTML-Apache FOP->PDF, but I'm primarily concerned with the .chm and Web
presentation here).

I have already converted these Word documents (via XSLT) into XHTML, but the
results are essentially the same. In my opinion, this way of documenting an
XML file is, er, *less than ideal* (the screen captures! the duplicated
descriptions!).

What I'd *really like* is an elegant way to, say, embed descriptions in an
XML schema (or otherwise link descriptions, in a separate file, to a
schema/DTD), and then (via XSLT) automatically generate good-looking, usable
documentation in XHTML.  I'd appreciate any pointers that people could offer
me to any existing approaches.

In the immediate term, I'll settle for getting rid of those XML Notepad
screen captures. The solution I'm considering is to harness MS IE's default
XML display capability (I hope I'm not straying too far from pure XSLT into
implementation-land here).  For example:

<html>
...
<p>Here is an example XML file: </p>
<iframe src="example.xml" width="100%" />
...
</html>

When viewed in IE, the "example.xml" file appears embedded in the page in a
scrollable frame (IE offers various ways to customize the appearance of such
"inline frames"), using IE's default "clickable/expandable hierarchy" XSLT.

What I'd like to do is (either/both):

- Specify which of the XML elements in the .xml file appears in the inline
frame (I'll have to use IE's frames collection to manipulate the contents of
the iframe; but, while I have DHTML programming experience, I've not yet
tried this specifically, so any tips from people who have done this will be
gratefully received).

- Specify which of the XML elements appear expanded (I think this will be
trickier, perhaps even impossible: that is, tweaking the behavior of IE's
underlying default XSLT stylesheet... of course, if anyone has a copy of
that stylesheet - or a similar stylesheet - then that would be a big help,
because I could then "parameterize" which elements get expanded, rather than
having them all expanded).

Regards,
Graham Hannington

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list