At 2009-12-30 07:27 -0800, Claudius Teodorescu wrote:
I would like to ask which is the most simple and elegant
manner to apply, by using a xsl stylesheet, an processing instruction
as follows
<xsl:processing-instruction
name="xml-stylesheet">href="/exist/rest//db/xsltforms/xsltforms.xsl"
type="text/xsl"</xsl:processing-instruction>
to an xml file, in order to have the referred xsl stylesheet applied
in the browser.
That is about as simple as it gets. There is no alternative syntax
in XSLT for generating a processing instruction.
I'm assuming you are on a server using XSLT to create an XML file
that is being sent to an XSLT-aware browser that recognizes
stylesheet association, and you want that generated file, when it
arrives at the browser, to invoke another stylesheet for its presentation.
If I haven't assumed the situation correctly, then I'm not really
sure what you are asking. Remember that any naked processing
instruction in your creating stylesheet will be ignored, so you need
to use an XSLT instruction to create a processing instruction in the
result tree.
I hope this helps.
. . . . . . . . . . . . Ken
--
UBL and Code List training: Copenhagen, Denmark 2010-02-08/10
XSLT/XQuery/XPath training after http://XMLPrague.cz 2010-03-15/19
XSLT/XQuery/XPath training: San Carlos, California 2010-04-26/30
Vote for your XML training: http://www.CraneSoftwrights.com/s/i/
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers: http://www.CraneSoftwrights.com/legal
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--