|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Getting Entity File Names
Hi Betty,
At 05:27 PM 10/23/2003, you wrote: There is a kicker - I thought of that also! The files themselves don't reference the DTD but they do contain ISO characters and not UNICODE characters. Oh what a drag. (You mean they include friendly ISO entity references such as &_ldquo; and not the Unicode reference for the character? Meaning the file won't parse standalone?) I guess I could include the ISO character sets in my XSLT. That would probably be the quickest way to do it. Unfortunately declaring entity sets for the stylesheet has no bearing on the parsing of the documents. It would also be easier if there were only one title per file. Somewhere in those files, there are 3 extra titles. A many-to-one table such as <file><filename>foo333.xml</filename> <title>Section 333A</title> <title>Section 333B</title> <title>What I Did on My Summer Vacation</title> </file> would still let you get from "What I Did on My Summer Vacation" to "foo333.xml". As for the problem with the entity references, I think you're going to have to normalize them away (an identity transform would do it). Your problem is a deep one, having to do with the fact that you are trying to work with two different scopes at once (two different notions of what your "document" consists in, i.e. each individual file or the aggregation of all of them). In order to take advantage of XML's lexical features such as entity references, you need to have a single scope: you can't have a DOCTYPE declaration at two levels of the system at once. This may show why entity references for file transclusion is a Bad Thing, and we should use XInclude or an analogous mechanism. (Eliot...?) Which may not be impossible for you. If instead of entity references to parsed entities, you had "file transclusion" PIs or XInclude elements, then all the information you need about your files is available inside XSLT. Of course, your parser won't do your file aggregation for you anymore: but the whole problem here is that the parser is doing that too well and thoroughly -- once the files are aggregated into a single document, it's very hard to see them anymore in their disaggregated form. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








