Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2016, 08:32 AM
Authorized User
 
Join Date: Nov 2016
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Post Character map Issue

When i using the external character map file using in my XSLT. we have facing some unwanted places also changed into the entity.

In the below coding element level and attribute value "id" have "-" changed into &hyphen".

I dont want to change that occurence. Please suggest.
For Example:

<level id="ACLPP_DPAR.SGM_ACLPP.DPAR.1&hyphen;1" leveltype="para0" toc-caption="1.1 SCOPE OF RULE BOOK" subdoc="true">
<glp:note><blockquote><hrule />
<p>
<text><inlineobject type="image" attachment="web-server" filename="leg1.gif" /> Legislation cited in [1.1] below. LawNow subscribers click through for daily updates and historical versions.</text><text>&nbsp;</text>
</p>
</level>

MY XSl:


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:docinfo="http://www.lexis-nexis.com/glp/docinfo"
xmlns:leg="http://www.lexis-nexis.com/glp/leg"
xmlns:fn="fn"
xmlns:ci="http://www.lexis-nexis.com/ci"
exclude-result-prefixes="xs"
version="2.0">

<xsl:output method="xml" version="1.0" encoding="ISO-8859-1" indent="yes" use-character-maps="mdash" omit-xml-declaration="no"/>

<xsl:include href="Functions.xsl"/> - Charmap XSL

Required XML:

Retain hyphen as a keyboard char '-'.

<level id="ACLPP_DPAR.SGM_ACLPP.DPAR.1-1" leveltype="para0" toc-caption="1.1 SCOPE OF RULE BOOK" subdoc="true">

Thanks and Regards,
Bharathidasan.
 
Old November 16th, 2016, 08:55 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

I don't know why you are using character maps (you haven't explained). But they can't be used selectively. If a character is changed using a character map, then it will be changed everywhere it appears.
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference
 
Old November 16th, 2016, 09:36 AM
Authorized User
 
Join Date: Nov 2016
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Thumbs up

Quote:
Originally Posted by mhkay View Post
I don't know why you are using character maps (you haven't explained). But they can't be used selectively. If a character is changed using a character map, then it will be changed everywhere it appears.
Thank You very Much mhkay.





Similar Threads
Thread Thread Starter Forum Replies Last Post
character-map example on page 948 TheovdH BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 3 November 7th, 2016 07:02 AM
Converting normal text to UTF values using "character map" ROCXY XSLT 1 June 8th, 2011 01:43 PM
Heat Map over Google Map ajit Javascript 0 March 7th, 2008 09:01 AM
Curious image map issue... can you help? BananaJim Javascript 2 November 29th, 2006 03:10 PM
Special Character issue in JSP Janardhana M Pro JSP 8 July 12th, 2006 11:21 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.