XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Jerry JanofskySubject: A question about processing instructions,XSLT and DocBook
Author: Jerry Janofsky
Date: 29 Sep 2006 04:52 PM
Hi,

This question relates to DocBook and XSLT. I hope this is an appropriate place to ask the question.

I am new to DocBook and XSLT. I am using DocBook with DocBook XSL 1.69.1.

I want to use a processing instruction in my DocBook XML to indicate the location of my customization.xsl file. I was hoping it would look something like:


<?xml version="1.0"?>
<?MyInstruction CustomizationLayer=" customization.xsl" ?>
<book>
.
.
.
</book>

I would then write a template to capture the value such as:

<xsl:template match="processing-instruction(‘MyInstruction’)">
“do something here”
</xsl:template>

However, I am unable to capture “MyInstruction” at all. It does work if I put the processing instruction in the “<chapter>” element, but this would be inappropriate.

Can someone tell me the proper way to handle this?

Jerry J
Satuit Systems

Posttop
Ivan PedruzziSubject: A question about processing instructions,XSLT and DocBook
Author: Ivan Pedruzzi
Date: 29 Sep 2006 05:16 PM
Hi Jerry,

See the following example to match a specific PI

<xsl:template match="processing-instruction()[local-name() = 'MyInstruction']">
<xsl:value-of select="name()"/>
</xsl:template>

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.