RE: [xsl] "(" ")" in xml file causing errors

Subject: RE: [xsl] "(" ")" in xml file causing errors
From: "Ragulf Pickaxe" <jawxml@xxxxxxxxxxx>
Date: Tue, 09 Mar 2004 09:18:28 +0000
Hi Anna,

I have an xml file which contains data like
<result><row>
<(expression)>3DO COMPANY</(expression)><(expression)>THDOQ</
(expression)><(expression)>95688</(expression)><(expression)>GVRC2 </
(expression)><(expression)>0.01300 / 0.04000(5000 x 5000)</
(expression)><(expression)> </(expression)><(expression)>02-11</(expression)>
</row> </result>


I am trying to use this xml to convert it to excel format(I have an xsl file
that converts xml to xls format).
When used directly it is giving an error "The content of elements must consist
of well-formed character data or markup." . I thought it could not because of
the "(". Do you think so?.


I want to get rid of braces( "(" and ")" from this xml and have another xml
with the same data without braces. I am trying to write xsl to do the same
but it is not working. Can someone please help.

XSL transforms an input XML document into another XML document.
If the first document is not valid XML, then the transformation cannot be done.


In your case, I would use regular expressions to remove the parantheses in your document
Something like regex.replace("\(expression\)","expression");
Then you will be able to do whatever transformations you want.


Hope this is a help,

Ragulf Pickaxe :-)

_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread