HowToCountNodes via MSXML production release parser RE: [xsl] counting the number of nodes

Subject: HowToCountNodes via MSXML production release parser RE: [xsl] counting the number of nodes
From: jdgarrett@xxxxxxxxxx
Date: Tue, 2 Jan 2001 06:49:05 -0600
The proper syntax for the Microsoft Production Release MSXML parser
is the following ... (there is only 1 Production Release)

<td>
<xsl:value-of select="count(page/content/paragraph)"/>
</td>

Note:
The production Release is available at
http://msdn.microsoft.com/xml/general/xmlparser.asp

1.)
For NT workstations you should also download and
install the 1.2 version of the Microsoft installer

2.)
And also download and install the xmlinst.exe utility

Then remove all instances of the previous parsers by
bringing up the cmd box from the Run line and typing

xmlinst.exe -u

3.)
Then run the msxml3.exe installation

4.) Then manually register only the msxml3.dll parser

If you have issues during the installation, then just
continue to run step 2 until you have zero installations
of any version installed..(you can check this by attempting
to open a valid XML file from IE and should receive the error
that no application is registered to handle this application)

Then run step 3 again and then step 4 .....then retest....

You should also download and install the MSXML SDK which
provides full documentation for the MSXML parser as well
as a "limited" set of examples.....


============================================================================
=====
========Here is a quote from the readme from the xmlinst.exe
utility=============

// **********************************************************************
//
//  xmlinst.exe Readme:
//  (C) Microsoft Corp., 2000
//
// **********************************************************************


The Microsoft® XML Parser (MSXML) 3.0 Release installs the MSXML 3.0 parser
(msxml3.dll) in side-by-side mode, which means that installing the MSXML 3.0
parser will not cause any previously installed version of the parser to be
replaced. Both the new parser and the old one will reside "side-by-side" on
your computer. However, Microsoft Internet Explorer, Microsoft Windows® 95,
Microsoft Windows 98, Microsoft Windows NT®, and Microsoft Windows 2000 will
continue to use only the older parser until you use the xmlinst.exe
installer tool to manually replace the older parser with the newer one.

When you run xmlinst.exe, it modifies the registry entry to appear as if the
entry was created by msxml3.dll, and overwrites the InprocServer32, TypeLib,
and Default Icon values. This modification allows applications that are
coded to the previous ClassIDs and ProgIDs to take advantage of the new
functionality in the msxml3.dll without changing your code.

   NOTE   While replace mode allows you to take advantage of new features in
MSXML 3.0, it may alter the behavior of existing XML applications that use
old ProgIDs.


To install MSXML 3.0 in Replace mode
------------------------------------
1.Open the command prompt window.

2.At the command prompt, enter:

	pathname\xmlinst

  where pathname is the folder where xmlinst.exe is installed.

  This installs the latest version of MSXML in replace mode.


In some cases, you may want to return to side-by-side mode and earlier
versions of MSXML.

To return to earlier versions of MSXML
--------------------------------------
1.At the command prompt, enter:

	pathname\xmlinst ?u

  where pathname is the folder where xmlinst.exe is installed.
  This command uninstalls any registry entries for MSXML.

2.Register the versions of MSXML you wish to run, making sure to register
the versions in order. For example, the following sequence shows how to
register msxml.dll, msxml2.dll, and msxml3.dll:

	C:\>regsvr32 msxml.dll
	C:\>regsvr32 msxml2.dll
 	C:\>regsvr32 msxml3.dll



Command Reference
-----------------
The following table lists the commands that you can use to run xmlinst.exe.

COMMAND			DESCRIPTION

"xmlinst"	        Run replace mode making msxml3.dll the new .dll path.

"xmlinst -u msmxl"	Delete all registry entries that were created by
msxml.dll.

"xmlinst -u msxml3"	Delete all registry entries that were created by
msxml3.dll.

"xmlinst -u"	        Delete all registry entries that were created by any
version of msxml.dll.

"xmlinst -?" 	        Print usage message.


==========end of quote from
Readme==============================================================

|-----Original Message-----
|From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
|[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Kay Michael
|Sent: Tuesday, January 02, 2001 5:51 AM
|To: 'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'
|Subject: RE: [xsl] counting the number of nodes
|
|
|> I'm trying to simply print out hte number of nodes with the following
|> expression:
|> <xsl:value-of select="count(select='page/content/paragraph')" />
|>
|> Can someone point out what I'm doing wrong or suggest a better
|> approach?
|>
|You're trying to guess the syntax of the language, a better approach is to
|read the specs.
|
|(a) The count() function expects a node-set, the result of "=" is always a
|boolean
|(b) function arguments don't have keywords, they are positional
|(c) XPath expressions are never written in quotes.
|
|Mike Kay
|
| XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
|
|



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


Current Thread