Subject: Re: what if use of up-to-date xslt processor not an option? From: Mike Brown <mike@xxxxxxxx> Date: Mon, 12 Jun 2000 13:35:30 -0600 (MDT) |
> Let me start this one off by saying that I am confused between > xml parsers and xslt processors. Which one is MSXML? This is useful info for anybody: XML parser: reads the byte sequences that comprise a physical XML document, and reports on the logical structures it finds therein. The two most popular implementations produce either a stream of SAX events a la "begin element foo, begin CDATA, CDATA bar, end element foo..." or a DOM object. XSLT processor: uses information in a node tree (the stylesheet tree) to create a new node tree (the result tree), possibly drawing upon information in one or more other node trees (the source tree(s)). Most XSLT processors accept as input SAX events generated by some XML parsers, and some accept DOM objects that may be generated by other XML parsers or created from scratch. The SAX events or DOM objects are used as the basis for the node trees that follow the XPath/XSLT data model. Some XSLT processors are bundled with XML parsers and provided as standalone applications (Instant Saxon, standalone XT are examples). Others are toolkits that application developers can utilize and integrate into their own software (Saxon, XT, etc). MSXML is one such toolkit that provides both an XML parser and an XSL processor in one Windows DLL. IE 5.0 is an application that utilizes MSXML to handle the processing of XML documents that have been associated with a stylesheet by means of a processing instruction in the XML. The version of MSXML that ships with IE 5.0 is based on and doesn't fully implement an very obsolete working draft of the XSL spec, before XSL was split into XSLT, XSLFO, and XPath. This is the source of much confusion among people new to XSLT. > I am using an application that I believe uses either the same or > something similar to the MSXML that ships with IE5. This application > contains sample xsl, all of which start with: > > <?xml version="1.0"?> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> Right, the "http://www.w3.org/TR/WD-xsl" namespace is what you *must* use with the original MSXML processor. > When I use this, I can create html tables. However, I can't use > something like: > <TD> > <xsl:choose> > <xsl:when test=". = 'Transaction_Type'"> > Transaction Type > </xsl:when> > <xsl:otherwise> > <xsl:value-of /> > </xsl:otherwise> > </xsl:choose> > </TD> > > I get: Expected token 'eof' found '='. . -->=<-- 'Transaction_Type' Try <xsl:when test=". $eq$ 'Transaction_Type'"> If that doesn't work, I give up. > think is called the literal result- basically the text of the elements. What you can't see because of the way IE5 "works" is the actual source that the HTML engine is rendering. All the elements from your stylesheet are there because none of them are recognized as XSL transformation instructions, due to the namespace not being right. The HTML engine in IE5 rightfully doesn't show the tags to you and it just appears on screen as if you are only getting the character data content of the elements. > Can someone give any suggestions on how I can get my tables AND > change my text? I think you're pretty close if you can just get that '=' bug worked out. Ask on the newsgroup microsoft.public.xsl. 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: what if use of up-to-date xslt , Dan Morrison | Thread | RE: what if use of up-to-date xslt , Kay Michael |
Re: Problems with sort., Brian Burridge | Date | Re: Stylesheet vs. Transform, Mike Brown |
Month |