[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: XSL Discussion
Subject: RE: XSL Discussion From: "James K. Tauber" <jtauber@xxxxxxxxxxx> Date: Mon, 23 Feb 1998 20:59:08 +0800 |
On Monday, 23 February 1998 16:00, Jeremie Miller [SMTP:jeremie@xxxxxxxxxx] wrote: > First off, I've mentioned in the past that I think a simple separation of > the patterns and actions should happen. Yes. It certainly makes things easier. > Lets talk about the patterns for a bit. Maybe it's just a matter of syntax, > but I would feel more comfortable writing something like: > <chapter> > <p type="introduction" xml:style="target"/> > </chapter> > instead of > <element type="chapter"> > <target-element type="p"> > <attribute name="type" value="chapter"/> > </target-element> > </element> > There might be some good reasons why the first simpler and more > understandable(IMHO) pattern just won't work, but I haven't found any > killers yet. With the latter, only predefined element types ("element", "target-element", "attribute") are used. With the former, the XSL stylesheet is using element types specific to the element types of your document. With <p type="introduc tion" xml:style="target"/> you are getting around this using attributes (a la HyTime). You'd probably want to do likewise with the chapter element as well and have <chapter xml:style="element">. But this is starting to look not much better than the original. > Based on the options above, why not allow attributes on the <pattern/>, > <action/>, and <style/> sections to determine the type of content? Like: > <style format="xml"></style> > and > <style format="css1"></style> > But this raises LOTS of issues(and great ideas :). Firstly, for an XSL > Stylesheet to be valid XML, the DTD would have to set the content types of > the <pattern/>, <action/>, and <style/> , to CDATA(for reasons I'll point > out below). This can cause headaches when you want to be well-formed or > exist w/o a DTD. As you no doubt realise, this issue goes well beyond XSL and is relevant to any application of XML. In short, you are asking for content models triggered off attribute values. This isn't going to happen with XML 1.0 unless you have a namespace mechanism that uses attributes to determine which <style> you mean. Thanks for raising these issues. I'm looking forward to discussions on this list. James -- James K. Tauber / jtauber@xxxxxxxxxxx James Tauber & Associates Perth, Western Australia XML Pages: http://www.jtauber.com/xml/ XML Tutorial: http://www7.conf.au/tutorialsday.html XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Pattern and Action Containers (was:, David Megginson | Thread | RE: XSL Discussion, David Schach |
Re: Pattern and Action Containers (, Sean Mc Grath | Date | RE: XSL Discussion, David Schach |
Month |