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

Re: problem with d-o-e in attribute

Subject: Re: problem with d-o-e in attribute
From: phdrix <pdrix@xxxxxxxxxxxx>
Date: Sat, 24 Apr 2004 16:27:11 +0200
attribute doe
Philippe Drix wrote:


Hi!


I am working on XSL Transformations to generate XML OpenOffice.org files, namely content.xml and styles.xml.
I am puzzled by a bug I cant work around by pure XSLT code.


Here the problem :

<?xml version='1.0' encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">


<xsl:template match="/">
        <foo>


Don't understand why you need it, but

<xsl:attribute name="bar">&amp;apos;bar&amp;apos;</xsl:attribute>

why not just

<foo bar="'bar'"/>

or

<foo bar="'{$bar}'"/>

best,
-Rob


No, I must find a mean to obtain :

<foo bar="&apos;bar&apos;"/>

beacause in OpenOffice styles.xml file, I have such an attribute, and it must be given as shown above, otherwise OpenOffice crashes when it tries to load the document.
I dont know why, but it is a fact.


So my problem is : given an XML file where there is an element <foo bar="&apos;bar&apos;"/>, written like this, how to write an XSL Transformation to copy the original XML file with some transformations, except for the element <foo bar="&apos;bar&apos;"/> which must remain as it is.

Regards -- Ph D

--
--
Philippe Drix - Objectiva

Consultant Nouvelles Technologies


Objectiva tel : 01 47 36 60 30 cel : 06 74 78 34 97 fax : 01 47 36 61 93 http://www.objectiva.fr 21-23, rue Aristide Briand 92170 Vanves

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.