Link to home
Start Free TrialLog in
Avatar of dyoung520
dyoung520Flag for United States of America

asked on

How do I print XML Document?

New to XML in general and have never had to use in a print application.  I need to be able to print this XML file formatted to the specifications of the stylesheet.  I'm assuming based on my limited research that this stylesheet used in the document is designed to be used in printing.

I can of course open the document to see what it should sort of look like in a browser.

I'm wondering basically if I'm missing something here and is there a specific application or process to print an XML document.

Sorry if I'm confusing... I'm confused.

Thanks and Regards,
Dan

Below is the beginning of the document.  The stylesheets are public, but I'm leaving out the actual guts of the document.

<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="http://www.accessdata.fda.gov/spl/stylesheet/spl.xsl" type="text/xsl"?>
<document xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 http://www.accessdata.fda.gov/spl/schema/spl.xsd">

Open in new window

Avatar of dyoung520
dyoung520
Flag of United States of America image

ASKER

I do know I can print it from the browser!  Just wondering if that is the best "format" I can get with it, page breaks etc.
>I'm wondering basically if I'm missing something here and is there a specific application or process to print an XML document.

Not really :) I print mine as normal text documents... Some people print from editors that have enough colours to make it more readable. Some use browsers

Now - technically if you want to make the things beautiful and so on, you have a few choices. I had been using xsl-fo: http://www.xml.com/pub/a/2002/10/09/xslfo.html - if you know what you are doing, it is an easy to use format.
Another option would be CSS: http://www.xml.com/pub/a/2005/01/19/print.html
And then you have: http://www.dpawson.co.uk/xsl/sect2/pretty.html or even the good old http://www.xmlhack.com/read.php?item=35 

In short: there are ways to make the things looking nice.. up to you if you want to you.
Is there a specific scheme used in Printing?  The document has an xsl file associated with it already - which is similar to CSS (right?).  I assumed that is why the browser rendered it all "pretty" like.  However I was asked to print the document.

So I guess my question should have been is XML ever used this way?  Kind of like a print control language, but obviously it would  have to be converted at some point to an actual printer language.  
ASKER CERTIFIED SOLUTION
Avatar of Venabili
Venabili
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank You