[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: Scalability problem


Subject: Re: Scalability problem
From: Rick Geimer <rick.geimer@xxxxxxx>
Date: Tue, 12 Oct 1999 14:21:24 -0700

Dave,

In SGML you would just make this a SUBDOC entity and be done with it.
Since we are dealing with XML, you may need to do a little more work,
such as declare the entity as NDATA with a notation type of XML. I would
then include the entities via an attribute in an empty element:

	<!DOCTYPE foo SYSTEM "foo.dtd" [
	<!ENTITY sect1 SYSTEM "sect1.xml" NDATA XML >
	]>
	<foo>
	...
	<include subdoc="sect1"/>
	<!-- assuming the subdoc att is declared as type ENTITY-->
	...
	</foo>

I believe then you could use the unparsed-entity-uri() and document()
functions to get this working. 

You may also be able to just store the URI directly in a CDATA
attribute, but you then loose some of the power of dealing with entites
(i.e. the ability to use PUBLIC identifiers and a catalog at some
point). 

Rick Geimer
National Semiconductor
rick.geimer@xxxxxxx

DPawson@xxxxxxxxxxx wrote:
> 
> I have a document, say doc.xml which is the parent
> of, say sect1.xml sect2.xml sect3.xml
> 
> all three are valid to one DTD, say docbook.dtd.
> 
> For the benefit of the editor, I want the 3 sections
> to be editable using the declared DTD, with doctype
> section. This also suites the validation (as individual
> documents).
> 
> For one medium I want the output to be in 4 files,
> doc.html
> sect1.html
> sect2.html
> sect3.html
> 
> Fine.... except I want to use <xsl:number
> to have consistant numbering across the suite
> of documents (Implies I need all 3 sections
> visible / part of the same source tree????)
> 
> For another medium /stylesheet I want all files combined
> in one output file :-(
> 
> If I use
> &sect1;
> &sect2;
> &sect3;
> in doc.xml, it fails because of the contained
> doctype declaration in the files sectn.xml
> 
> I'm getting sick of commenting out the
> doctype and internal DTD set each
> time I want to produce an output edition,
>  but I  can't see a way round it.
> 
> And I haven't got round to using James examples
> of <xt:document yet, though
> a loop on
> <xsl:for-each select="./section">
> <xt:document
> seems about right.
> 
> .... Has anyone sorted this problem before?
> any help appreciated.
> (Sorry Tony if its near boundary conditions
> for xsl)
> 
> TIA, DaveP
> 
>  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
Keywords
xml