Solved

Good validating XML/XSLT parser for Windows needed

Posted on 2003-11-04
5
634 Views
Last Modified: 2008-02-01
Hi

I'm currently creating some XML stuff which should be displayed as an HTML page after being processed with XSLT.  Internet Explorer does he trick, but it doesn't seem to be validating (I can completely ignore my DTD if I want).  This XML stuff will end up on a webpage for users to download, an many of these users will not be XML experts.

So I'm looking for a parser with the following requirements:

1. Easy to install (laymen should be able to do it)
2. For Windows
3. Parses XML, XSL/XSLT (converts to HTML)
4. If possible, a GUI
5. Free
6. Allows to print the parsed document

Does anyone know if such a parser exists?  Thanks.
0
Comment
Question by:IconMan7
  • 2
  • 2
5 Comments
 
LVL 3

Author Comment

by:IconMan7
ID: 9684816
Ah, forgot one requirement:

7. It must be validating :)
0
 
LVL 26

Accepted Solution

by:
rdcpro earned 100 total points
ID: 9685469
You're describing MSXML...

1. Easy to install (laymen should be able to do it)
--> Comes with IE6
2. For Windows
--> Comes with IE6 for Windows
3. Parses XML, XSL/XSLT (converts to HTML)
--> Parses XML, includes XSLT processor
4. If possible, a GUI
--> Comes with IE6
5. Free
--> Comes with IE6
6. Allows to print the parsed document
--> Comes with IE6 (using javascript: window.print, or File >> Print)
7. It must be validating :)
--> Completely conforming and validating using DTD.  Version 4 validates against W3C XML Schema

The thing is, Internet Explorer does not validate when simply loading and XML Document into the window.  It does validate whenever you load xml in code (unless you tell it not to).  Here's a transformation tool that will show you some of the code you need to work with XML.

http://dev.rdcpro.com/Members/rdcpro/tools

Here's an example of Javascript that might run in a browser to load and validate an XML document.

var xmlDoc = new ActiveXObject("Msxml2.DomDocument")
xmlDoc.async = false;
xmlDoc.validateOnParse = true;  // this is the default
xmlDoc.resolveExternals = true;
try
{
    xmlDoc.load("foo.xml")
    var err = xmlDoc.parseError
    if (err.errorCode != 0)
    {
        alert("Parse Error: " + err.reason)
    }
}
catch (e)
{
    alert("error: " + e);
}



Regards,
Mike Sharp
0
 
LVL 4

Expert Comment

by:Xikilm
ID: 9688157
Greetings IconMan7:

Personally, I like to use Xalan: http://xml.apache.org/xalan-c/index.html

>1. Easy to install (laymen should be able to do it)
It is easy to install and comes with pretty good instructions
>2. For Windows
It has a native Windows binary and it runs on the various *nixs
>3. Parses XML, XSL/XSLT (converts to HTML)
No problems here
>4. If possible, a GUI
There is no frontend GUI that I know of, only command line
>5. Free
Free and opensource
>6. Allows to print the parsed document
You can output to file, command shell, or (from command line) you could send its output to a printer
>7. It must be validating :)
This is covered as well.

HTH,
Xikilm
0
 
LVL 26

Expert Comment

by:rdcpro
ID: 9691493
Technically speaking, Xalan isn't a parser, it's an XSLT processor.  It does not do validation.  It requires Xerces to parse the XML.  Validation with Xerces is a separate issue, as it is with all parsers to my knowledge.  The XML Spec does not require validation of the parser.

I'm not completely clear on what the OP is trying to do, but if the end result is XML being processed and validated in an HTML page, the target browser is probably going to determine what parser (and XSLT processor) is going to be used.  If the XML is being processed on the server, it doesn't matter so much which is being used, but still there's going to be a particular platform involved, which will dictate to some extent what parser is needed.  I think the OP had some misunderstandings of what's happening when XML is downloaded and displayed in the browser.  While the browser needs to resolve externals (and it will do so), validation on the client seems unnecessary, if the XML is created on the server, and all the browser is doing is displaying the HTML result of a transform.  

Regards,
Mike Sharp
0
 
LVL 3

Author Comment

by:IconMan7
ID: 9725258
Looks like IE6 will be my best option.  Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
This video discusses moving either the default database or any database to a new volume.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now