Hi Chris,
At 03:48 PM 5/13/2003, you wrote:
I'm thinking I could use document('....') to pull in the other data,
and I could use <xsl:key> to access the data, but I'm concerned
that the other data doesn't conform to the same DTD as the rest.
It shouldn't be a problem. Whether the data is any good is a separable
question from whether it conforms to a particular (or any) DTD. :->
I hope (not yet proven) that the other data source is at least well-
formed -- my validating parser hasn't shown me any well-formedness
errors. (By the way, this is off-topic, but does anybody happen to
know how I can just call a non-validating parser to confirm that a
document is well-formed? I have access to xalan/xerces and expat
(nee nsgmls) -- probably some others but not immediately to hand)
Will I be able to just call in the other document without worrying about
its validity?
If it's truly well-formed, yes. (Again, you still might have to worry about
the quality of the data.)
All XML parsers do wf-checking; most validating parsers have a switch to
allow you to turn validation off. For tasks such as you're looking at, I
like the RXP parser (google XML RXP parser), which is fast and conformant
and runs from a command line, with various switches including this one. I
know for sure that Xerces has such a switch: in its docs you want to look
at "SAXCount" or some other mini-application.
One more complication: the additional source document is in 27 pieces,
so I was combining them using the internal subset on the DOCTYPE
line, like so:
<!DOCTYPE OPR PUBLIC "-//xxx/DTD xxx//" "Oro-v315.dtd" [
<!ENTITY efa SYSTEM "./ef/xmlout/efa.xml">
...]
>
&efa;
...
An old SGML trick which is still very handy, but here I'm concerned
that I'm no longer in pure well-formedness once I've put that DOCTYPE
line in there.
You're still well-formed: not to worry. (You're not "standalone" though.)
This won't be an issue until you run into some tool that doesn't conform to
the Rec in this respect.
Cheers,
Wendell
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list