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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> + DB-to-XML can only get one row... (6)
-> + Bug- Display of Redefined sche... (2)
-> - A question about processing in... (2)
-> ->A question about processi...
-> + XML to XML Mapping (2)
-> + Web Service - Was Working, But... (3)
-> + Window Contents do not resize (8)
-> + BaseCatalog Not Adding to Proj... (3)
-> + SS Does not like # in the file... (6)
-> + Bad Context Menu Text (2)
-> + XSLT and EDI x12 (3)
-> - Batch validation (1)
-> + Visual C++ Runtime Error (3)
-> - WSDL's, XML Mappings To DB fie... (1)
-> + SS crashes when trying to save... (3)
-> + XML Pipelines (4)
-> + Handle Music Playlists in Styl... (2)
-> + Using a font in FOP (9)
-> + Automation in .NET/WebService ... (3)
-> + Convert .CSV file to XML (6)
-> + FOP Plugin does not install wi... (8)
-- Previous [1921-1940] [1941-1960] [1961-1980] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.