[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: doc() and docref() relative to source document

Subject: Re: doc() and docref() relative to source document
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 16 Jun 1999 11:21:33 -0400
jclark doc
 James,

Can the file, 'bar.xml', be an independant file, with its own full XML and
doctype declarations? Can it comply with a different DTD? Or must it be a
dummy sort of a file with a slim XML declaration and no doctype declaration?

I was trying to think of a way of building a repository-type DTD that was
pretty slim and merely linked out to documents, that conformed with
different DTDs. I've built the DTD and thought that I'd build a big
stylesheet to take care of the markup from all DTDs. Will that work with
'docref'?

What happens if I store the pointer to my external documents as entities?
<!ENTITY somedoc SYSTEM "somedoc.xml" NDATA XML> . Must I store them as URIs
within an attribute of the reference element?

Thanks a lot,

Richard.


Richard Lander
relander at uwaterloo.ca
http://pdbeam.uwaterloo.ca/~rlander/

Professional XML Authoring
http://www.on-line-learning.com/

----- Original Message -----
From: James Clark <jjc@xxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Tuesday, June 15, 1999 11:14 PM
Subject: Re: doc() and docref() relative to source document


> docref() resolves relative URIs to the source document. For example, if
> you have a source document http://www.jclark.com/foo.xml containing
>
>  <doc href="bar.xml"/>
>
> and a stylesheet http://www.jclark.com/stylesheets/style.xsl, then
> instantiating a template
>
> <xsl:template match="doc">
>   <xsl:apply-templates select="docref(@href)"/>
> </xsl:template>
>
> will process the file  http://www.jclark.com/bar.xml not the file
> http://www.jclark.com/stylesheets/bar.xml.
>
> Nick Manson wrote:
> >
> > After reading the latest working draft, I have a question
> > about doc() and docref().
> >
> > According to my understanding of the spec, the URI reference
> > is mapped relative the stylesheet.  How do you reference
> > documents relative to the source document?
> >
> > As near as I can tell, (I haven't had time to play with the
> > latest xt yet) there isn't even a standard way to get the
> > element base-URI.  So, I can't even think of a generic way
> > of extending an XSL processor to retrieve relative URLs in
> > the source document.
> >
> > Am I missing something?
>
>
>
>  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.