Re: XML/XLink/XSL fundamentals

Subject: Re: XML/XLink/XSL fundamentals
From: Mike Brown <mike@xxxxxxxx>
Date: Thu, 10 Aug 2000 10:03:12 -0600 (MDT)
Raheja, Dhruv wrote:
> 1.) i am confused between "XML parser" and "XML processor".

What the XML 1.0 Recommendation calls the "XML processor" is what most
people call an "XML parser". "Parser" implies a slightly more specific
functionality -- a "processor" might go above and beyond just parsing, but
for all intents and purposes, they're one and the same.

> 2.) I am using an XML editor called XML Writer. It supports the working
> draft of the XSL recommendation. When I give the following namespace
> declaration:
> 
> <xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>, the parser returns an
> error message. 

Then the version of XML writer you are using is not very useful, is it?

> In addition to that, when I try and use <xsl:number/> I get an error message
> from the browser.

Then the browser (embedded IE 5.0?) is also not very useful, unless you
intend to stick to the outdated syntax. See the MSXML FAQ at
http://www.netcrucible.com/xslt/msxml-faq.htm if you are determined to use
IE for XSLT processing.

> Which parser/editor will allow me to alliviate these problems?

I would suggest using Notepad or any HTML editor, with syntax validation
off, and run a standalone XML parser + XSLT processor combination from the
command line to produce HTML documents. Look into "standalone XT" or
"Instant Saxon".

> Basically I need an application that will allow me to fully exploit XSL
> (including formatting objects) and XLink/XPointer etc.

There are none. These are young specifications and the tools that
implement them individually are being written from scratch.

> 3.) The error message related to <xsl:number> is displayed by the browser
> and not by the editor. Is there some way to get rid of this problem? Is
> there a Microsoft parser that supports the latest XSL recommendations?

See the MSXML FAQ.

> 4.) I need to be conversant with XLink/XPointer because I need to link
> various XML documents together. I also need to learn Formatting Objects in
> order to display my documents in a non-HTML format. Are there any
> books/tutorials on these subjects?

Someone should tell us if I'm wrong, but XLink/XPointer don't seem to me
to be very useful right now. I'd like to see use cases that actually work.

> 5.) In the XML documents that I plan to prepare (I have a protoype at
> present), there will be elements that are common to some of the documents. I
> want to be able to make changes to the element content in one document and
> have it reflect in all the other documents that have the same element so
> that I can avoid making changes to each individual document. Is that
> possible?

XML has an entity mechanism for this. If you think of each file as being
an entity, and you put well-formed XML in each file, you can refer to one
file from another via an entity reference, provided the entity is declared
in a DTD.

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE Staff [
  <!ELEMENT Staff (Person*)>
  <!ENTITY accounting SYSTEM "acc.xml">
  <!ENTITY shipping SYSTEM "shp.xml">
  <!ENTITY president SYSTEM "prs.xml">
]>
<Staff>
  &accounting;
  &shipping;
  &president;
</Staff>

<?xml version="1.0" encoding="utf-8"?>
<!-- acc.xml; this is a well-formed entity but not a well-formed document -->
<Person>Jim</Person>
<Person>Jane</Person>
<Person>Joe</Person>

etc.

Good luck.

   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


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


Current Thread