Subject: RE: [xsl] Documenting XML schema: a schema-to-XHTML stylesheet? From: Graham Hannington <Ghannington@xxxxxxx> Date: Mon, 28 Apr 2003 18:29:23 +0100 |
Argh... I've just found out that one of the XML document types that I'd planned to document (by writing an XDR schema, and then using XSLT to produce documentation in XHTML) cannot be fully expressed in either XDR or XSD, but (from what I've read in Jeni Tennison's tutorials) *might* be able to be described via Schematron. This is because, in this XML document type, allowable child elements vary, depending on the value of an attribute in the parent element. For example, if the value of attrA is "this", then elementX can contain elementX1 and elementX2: <elementX attrA="this"> <elementX1>...</elementX1> <elementX2>...</elementX2> </elementX> If the value of attrA is "that", then elementX can contain elementX3 and elementX4 (but not elementX1 or elementX2): <elementX attrA="that"> <elementX3>...</elementX3> <elementX4>...</elementX4> </elementX> I'm almost certain that this situation cannot be described in either XDR or XSD (or can it?). I'm *hoping* that it can be described in Schematron (or some other schema language?). Before this email gets too far off the topic of XSLT (and veers into schemas)... it nows looks like I can't - at least, for this specific XML document type - use either of the previously recommended XSLT stylesheets. (Or rather, I could, but the resulting HTML documentation wouldn't be as useful as I'd like, because it wouldn't break down which child elements were valid for particular attribute values.) I've googled for an XSLT stylesheet that does the same sort of thing (that is, produces human-readable XHTML documentation) for Schematron schemas, but so far, no luck. Does anyone know of such an XSLT stylesheet? When I start thinking about writing a schema-to-XHTML XSLT stylesheet that takes into account such rules (that is, allowable child elements depending on an attribute value in the parent element), my head starts to throb and my vision goes blurry ;-). So maybe it's not a reasonable thing to ask for; but I'm loathe to give up the "dream" of using a schema with XSLT to produce documentation for an XML document type. Graham Hannington -----Original Message----- From: Graham Hannington [mailto:Ghannington@xxxxxxx] Sent: 28 April 2003 14:22 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Documenting XML schema: a schema-to-XHTML stylesheet? Sundar, Julian, Thanks! Both look useful, but for now, I'm using the MS XSLT file. Julian, I can see from the MS author's comments that you had input into this... at first glance, it seems to be *exactly* what I need... very nice. Sundar, I've never seen that Titanium site before... lots of interesting stuff there. (And it does my heart good to see links to Oz; I'm from Perth, but currently living in the UK.) Regards, Graham Hannington XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Documenting XML schema: a, Graham Hannington | Thread | Re: [xsl] Documenting XML schema: a, Mike Haarman |
RE: [xsl] unwelcome SPAN in text ou, Passin, Tom | Date | [xsl] Filter by date in XSL not in , Amargos Carreras, Al |
Month |