Browsing XML documents from the WEB and locally

Documents can be prepared in XHTML which is defined in XML with a corresponding DTD see XML Glossary and Acronyms - list of  W3C Technical Reports and Publications for more on the meanings etc….

OR

For every XML web page, the corresponding style sheet (XSL) has to be available to the Browser. The XML document specifies the style sheet(s) to be used, via a PI (processing instruction). A given style sheet would not need to be reloaded if the browser supports cacheing of style sheets.

A single XML file may be useful for conveying information if the receiving application has built-in understanding of how to process and/or display it. ( an application specific XML file used for data transfer say)

A single XML file may require supporting documents like a DTD or a schema or files used as external entities

If an XML document uses style sheets, they typically are separate files that need to be down loaded along with the document.

The W3C has a processing instruction for connecting style sheets to documents. Those stylesheets may be XSL or CSS -
both choices are available. (See http://www.w3.org/TR/xml-stylesheet for more on this.)

There can be still other resources that need to be downloaded, like hub documents for extended linking (if XLink finally gets a new draft and real implementation) or linked RDF metadata files, for instance, but it depends on the documents and the application.

It should be easier to write a common style sheet and then write XML documents which references that style sheet rather than specifying formatting all the time in the document.

XSL is not designed to be embedded. It transforms an XML document into a set of formatting objects rather than annotating it.XSL is an intrusive process where the stylesheet is basically a set of rules for transforming your XML documents into its formatting vocabulary. While you can write documents directly in that formatting vocabulary, this usage is controversial at best and loathed at worst. Stylesheets tend to be frequently reused and easily cached.

More details available at XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

"... I created a free resource on our web site in the "resources" area illustrating a Microsoft DOM script that runs an XSL stylesheet on an XML file without validating either file, thus not requiring a DTD to run. This works on win95. Crane Softwrights Ltd. http://www.CraneSoftwrights.com/l/ "

Potential Saving on bandwith by allowing the use of a local stylesheet can only be achieved if an XML document has a PI to point to the style sheet, like this: <?xml-stylesheet href="file:///mystyle.css" type="text/css"?> (The href pseudo-attribute's value explicitly locates the style sheet on some locally-available resource.) Multiple users could then use the style sheet as long as either .

  1. they all have a copy of it, kept in the same location on their local workstations, or
  2. the URL points to a network resource to which they all have access.

XML is different from HTML in that the tagset for a given vocabulary is unknown until you access a document in that vocabulary. Suppose you go to an on-line auction site whose pages are raw XML; to style this on your own you'd need to laboriously go through the document and associate a style preference for each tag. Then you go to a government site where you want to access legislation or regulatory papers -- the style sheet preferences you just created for the auction site are useless, because the tagset's probably completely different. So the best you could do would be to "choose
your own stylesheet" *for each separate XML vocabulary you want to browse*. Suddenly this wonderful ability to choose our own style sheet seems less attractive!

Now, an XML document *can* include more than one style sheet PI, if the document's author has been considerate enough. So (to choose completely superficial examples) there might be one style sheet for a "corporate" look, one for a "casual" look, one for customers, one for vendors, and alternative audio style sheets for each of them. It's not hard to envision client software smart enough to prompt the user, "Which of the following style sheets supplied by the document author do you want to use?" -- and presenting a menu. Whether or not this constitutes true user choice depends on your definition!

How to display more than one file in one XML document. Ie a book written in separate chapters is wanted as one big display. You can sort of do this with DTDs and external entity declarations, but it's tricky. For instance only your master document is allowed to have a DOCTYPE declaration, and the XML declaration is restricted.

You should also eventually be able to do it with parsed XLinks. However that technology is still being developed. See
http://metalab.unc.edu/xml/books/bible/updates/16.html particularly Listing 16-1 and 16-2 for examples of that.

ASP code says what to do with data.

ASP (Active Server Pages) is Microsoft Web server's server side execution technology; a technology to generate dynamic and personalised web pages. Technically speaking, it provides a functionality similiar to CGI, Servlets
etc... Actually, ASP (Active Server Pages) is either VBScript or JavaScript (your choice) - both of which run on the server - NOT on the client. Basically an IIS add-on, but it has been ported to other platforms by ChiliSoft. The "other" ASP acronym apparently stands for Application Service Provider. Check out http://msdn.microsoft.com/xml/articles/xml030998.asp for a simple article that describe how you can use ASP to create XML.

XML describes data structures and don´t say what to do. (But you are able to read a XML-document by ASP and to process it.)


The HyBrick is a XML/SGML browser supporting xlink/xpointer.The URL: http://www.fujitsu.co.jp/hypertext/free/HyBrick/en/index.html