Solved

Good validating XML/XSLT parser for Windows needed

Posted on 2003-11-04
5
660 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

617 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