xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Sweeney <Richard_Swee...@spanlink.co.uk>
Subject Re: Preventing case changes
Date Fri, 11 Oct 2002 14:21:43 GMT
Here's the code which does the transformation:

DOMResult dr=new DOMResult();
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
PropertyMgr pm=PropertyMgr.getPropertyMgr(ui.getPropertyFilename());
StreamSource ss=new StreamSource(new
FileInputStream(pm.getProperty(Constants.STYLESHEET_SOURCE)+xslURI));
DOMSource ds2=new DOMSource(doc);
TransformerFactory tFactory = TransformerFactory.newInstance();
Transformer trns = tFactory.newTransformer(ss);
trns.transform(ds2, dr);

Here is a portion of the xsl file

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
	<!--
		Outer-most section
	-->

	<xsl:template match="EXPENSE_QUERY">


		<xsl:variable name="status">
			<xsl:value-of select="@STATUS_ID" />
		</xsl:variable>
		<xsl:variable name="defn">
			<xsl:value-of select="@EXPENSE_SHEET_DEFN_ID" />
		</xsl:variable>


		<mytag layoutName="AuthQuery1" theme="AuthQuery"
pageTitle="AuthQuery">

Once the transformation has taken place, the attribute layoutName in <mytag>
will be changed to lowercase which then cannot be parsed. I've probably made
some stupid error somewhere. Any help would be appreciated.

-------------

Xalan should never be changing the case of tags -- except _POSSIBLY_ when 
outputting in (X)HTML mode, since (X)HTML actually does specify what the 
case of its tags should be.

Can you give us a small sample that demonstrates the problem?

______________________________________
Joe Kesselman  / IBM Research

Mime
View raw message