Hi friends,
This is a sincere request to all of you guys..I need help
First time When I login into a page,it is succeded, after that i changed the url to the previous one and try to login once again , but this time i am geting exception like
-------
Exception: in FillFormService.getHTML(), msg: TransformerConfigurationException: ParseXMLwithStylesheet.run(), msg: javax.xml.transform.TransformerConfigurationExcept ion: javax.xml.transform.TransformerException: javax.xml.transform.TransformerException: Expected ], but found: Assistans
------------
Can anyone please help me out from this problem?
thnx..
7 1576
Welcome to TheScripts TSDN....
Please post your XML and XSL code.
It sounds like a syntax error in XSL.
I m not able to put XSL here..
Welcome to TheScripts TSDN....
Please post your XML and XSL code.
It sounds like a syntax error in XSL.
Hi,
can you pls check if anything is wrong in my XSLT..there are two XSLTs..pls check it and let me know thnx .. - <?xml version="1.0" encoding="UTF-8" ?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
-
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" cdata-section-elements="description" />
-
- <!--
-
This stylesheet generates xml of the form:
-
<FIELDS>
-
<FIELD pushmail="0" type="13" description="News" publicField="0">
-
<FIELDALIAS>TESTTESTTEST</FIELDALIAS>
-
<VALUES>
-
<VALUE category="News">Finance</VALUE>
-
<VALUE category="News">News</VALUE>
-
<VALUE category="Dette er en test">TESTTEST1</VALUE>
-
<VALUE category="Dette er en test">test2</VALUE>
-
<VALUE category="Dette er en test">TESTTEST3</VALUE>
-
<VALUE category="Dette er en test">test4</VALUE>
-
</VALUES>
-
</FIELD>
-
</FIELDS>
-
-
-
-->
-
- <xsl:template match="/">
-
- <submission>
-
- <FIELDS>
-
- <xsl:for-each select="//field[.//input[@type='radio' or @type='checkbox']]">
-
- <FIELD>
-
- <FIELDALIAS>
-
<xsl:value-of select="@alias" />
-
</FIELDALIAS>
-
- <description>
-
<xsl:value-of select="./description" />
-
</description>
-
- <VALUES>
-
- <xsl:for-each select=".//input">
-
- <xsl:if test="@value[.!='']">
-
- <VALUE>
-
<xsl:value-of select="@value" />
-
</VALUE>
-
</xsl:if>
-
</xsl:for-each>
-
</VALUES>
-
</FIELD>
-
</xsl:for-each>
-
</FIELDS>
-
</submission>
-
</xsl:template>
-
</xsl:stylesheet>
2.. - <?xml version="1.0" encoding="UTF-8" ?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
-
<xsl:output method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes" cdata-section-elements="description" />
-
- <xsl:template match="/">
-
- <fields>
-
- <xsl:for-each select="//submission[1]/FIELDS">
-
- <xsl:for-each select=".//FIELD">
-
- <field>
-
- <xsl:attribute name="alias">
-
<xsl:value-of select=".//FIELDALIAS" />
-
</xsl:attribute>
-
- <xsl:for-each select=".//VALUE">
-
- <xsl:call-template name="count">
-
<xsl:with-param name="value" select="." />
-
<xsl:with-param name="alias" select="ancestor::FIELD/FIELDALIAS" />
-
</xsl:call-template>
-
</xsl:for-each>
-
- <description>
-
<xsl:value-of select="./description" />
-
</description>
-
</field>
-
</xsl:for-each>
-
</xsl:for-each>
-
</fields>
-
</xsl:template>
-
- <xsl:template name="count">
-
<xsl:param name="value" />
-
<xsl:param name="alias" />
-
- <value>
-
- <xsl:attribute name="name">
-
<xsl:value-of select="." />
-
</xsl:attribute>
-
- <!--
-
The -1 at the end compensates for the extra field inserted so it is possible to see values and
-
or fields that has not been submitted
-
-
-->
-
- <xsl:attribute name="count">
-
<xsl:value-of select="count(//FIELDS[FIELD[FIELDALIAS[.=$alias]]//VALUE[.=$value]])-1" />
-
</xsl:attribute>
-
</value>
-
</xsl:template>
-
</xsl:stylesheet>
Welcome to TheScripts TSDN....
Please post your XML and XSL code.
It sounds like a syntax error in XSL.
Hi,
can you pls check if anything is wrong in my XSLT..there are two XSLTs..pls check it and let me know.. thnx ..here is my code that generates that specified exception... -
-
try{
-
-
DAODomino dao = null;
-
DominoAccessVO domAccessVO = null;
-
-
dao = new DAODomino();
-
domAccessVO = new DominoAccessVO();
-
domAccessVO.setCookie(cookies);
-
domAccessVO.setDominoURL( server+"/"+ffDbPath+"/formResultsXML?ReadForm&RestrictToCategory="+(String)collFillFormURL.get(0)+"&count=-1" );
-
String strResults =dao.getData(domAccessVO, requestSetting.getWebSphereSetting()).getDominoTxt();
-
-
dao = new DAODomino();
-
domAccessVO = new DominoAccessVO();
-
domAccessVO.setCookie(cookies);
-
domAccessVO.setDominoURL( server+"/"+ffDbPath+"/viewDefinitionForms/"+(String)collFillFormURL.get(0)+"/$File/FormDef.xml" );
-
byte[] byteArrFormDef = dao.getData(domAccessVO,requestSetting.getWebSphereSetting()).getDominoTxt().getBytes();
-
-
-
String strFormDefValues = new ParseXMLwithStylesheet().getResult(
-
new ByteArrayInputStream(byteArrFormDef),
-
new ByteArrayInputStream(
-
ResourceLoader.getResource(
-
"ParseFormDefResults.xsl",
-
requestSetting.getSiteSetting().getEncoding()
-
).getBytes()
-
)
-
);
-
-
int index = strResults.indexOf("<submission>");
-
strResults = strResults.substring(0,index) + strFormDefValues + strResults.substring(index);
-
-
/*
-
* Generate XSL for profile replace.
-
*/
-
msg = new ParseXMLwithStylesheet().getResult(
-
new ByteArrayInputStream(strResults.getBytes()),
-
new ByteArrayInputStream(
-
ResourceLoader.getResource(
-
"ParseResults.xsl",
-
requestSetting.getSiteSetting().getEncoding()
-
).getBytes()
-
)
-
);
-
-
msg = new ParseXMLwithStylesheet().getResult(
-
new ByteArrayInputStream(msg.getBytes()),
-
new ByteArrayInputStream(
-
ResourceLoader.getResource(
-
"Results2HTML.xsl",
-
requestSetting.getSiteSetting().getEncoding()
-
).getBytes()
-
)
-
);
-
}catch(Exception e){
-
msg = "Exception: in FillFormService.getHTML(), msg: "+e.getLocalizedMessage();
-
System.out.println(msg);
-
e.printStackTrace();
-
log.error(msg, e);
-
}
-
return msg;
-
}
................................... 1. ParseFormDefResults.xsl -
<?xml version="1.0" encoding="UTF-8" ?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
-
<xslutput method="xml" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" cdata-section-elements="description" />
-
- <!--
-
This stylesheet generates xml of the form:
-
<FIELDS>
-
<FIELD pushmail="0" type="13" description="News" publicField="0">
-
<FIELDALIAS>TESTTESTTEST</FIELDALIAS>
-
<VALUES>
-
<VALUE category="News">Finance</VALUE>
-
<VALUE category="News">News</VALUE>
-
<VALUE category="Dette er en test">TESTTEST1</VALUE>
-
<VALUE category="Dette er en test">test2</VALUE>
-
<VALUE category="Dette er en test">TESTTEST3</VALUE>
-
<VALUE category="Dette er en test">test4</VALUE>
-
</VALUES>
-
</FIELD>
-
</FIELDS>
-
-
-
-->
-
- <xsl:template match="/">
-
- <submission>
-
- <FIELDS>
-
- <xsl:for-each select="//field[.//input[@type='radio' or @type='checkbox']]">
-
- <FIELD>
-
- <FIELDALIAS>
-
<xsl:value-of select="@alias" />
-
</FIELDALIAS>
-
- <description>
-
<xsl:value-of select="./description" />
-
</description>
-
- <VALUES>
-
- <xsl:for-each select=".//input">
-
- <xsl:if test="@value[.!='']">
-
- <VALUE>
-
<xsl:value-of select="@value" />
-
</VALUE>
-
</xsl:if>
-
</xsl:for-each>
-
</VALUES>
-
</FIELD>
-
</xsl:for-each>
-
</FIELDS>
-
</submission>
-
</xsl:template>
-
</xsl:stylesheet>
------------------------------------- 2.. ParseResults.xsl - <?xml version="1.0" encoding="UTF-8" ?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
-
<xslutput method="xml" encoding="UTF-8" omit-xml-declaration="no" indent="yes" cdata-section-elements="description" />
-
- <xsl:template match="/">
-
- <fields>
-
- <xsl:for-each select="//submission[1]/FIELDS">
-
- <xsl:for-each select=".//FIELD">
-
- <field>
-
- <xsl:attribute name="alias">
-
<xsl:value-of select=".//FIELDALIAS" />
-
</xsl:attribute>
-
- <xsl:for-each select=".//VALUE">
-
- <xsl:call-template name="count">
-
<xsl:with-param name="value" select="." />
-
<xsl:with-param name="alias" select="ancestor::FIELD/FIELDALIAS" />
-
</xsl:call-template>
-
</xsl:for-each>
-
- <description>
-
<xsl:value-of select="./description" />
-
</description>
-
</field>
-
</xsl:for-each>
-
</xsl:for-each>
-
</fields>
-
</xsl:template>
-
- <xsl:template name="count">
-
<xslaram name="value" />
-
<xslaram name="alias" />
-
- <value>
-
- <xsl:attribute name="name">
-
<xsl:value-of select="." />
-
</xsl:attribute>
-
- <!--
-
The -1 at the end compensates for the extra field inserted so it is possible to see values and
-
or fields that has not been submitted
-
-
-->
-
- <xsl:attribute name="count">
-
<xsl:value-of select="count(//FIELDS[FIELD[FIELDALIAS[.=$alias]]//VALUE[.=$value]])-1" />
-
</xsl:attribute>
-
</value>
-
</xsl:template>
-
</xsl:stylesheet>
----------------------------- 3. Results2HTML.xsl - <?xml version="1.0" encoding="UTF-8" ?>
-
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
-
<xsl:output method="html" encoding="UTF-8" omit-xml-declaration="yes" indent="yes" />
-
- <!-- This stylesheet parses xml of the form:
-
-
<fields>
-
<field alias="">
-
<value name="Finance" count="1" />
-
<value name="News" count="1" />
-
<value name="TESTTEST1" count="1" />
-
<value name="test2" count="1" />
-
<value name="TESTTEST3" count="1" />
-
<value name="test4" count="1" />
-
</field>
-
<field alias="">
-
<value name="Finance" count="5" />
-
<value name="News" count="5" />
-
<value name="test1" count="5" />
-
<value name="test2" count="5" />
-
<value name="test3" count="5" />
-
<value name="test5" count="1" />
-
<value name="test4" count="4" />
-
</field>
-
-
-->
-
- <xsl:template match="/">
-
- <table class="FFQuickPollResultsTable">
-
- <xsl:for-each select="//field">
-
- <tr>
-
- <td colspan="4" class="FFQuickPollResultsTableFieldDescriptionRow">
-
<xsl:value-of select="./description" />
-
</td>
-
</tr>
-
- <xsl:call-template name="genline">
-
- <xsl:with-param name="countall">
-
<xsl:value-of select="sum(./value/@count)" />
-
</xsl:with-param>
-
- <xsl:with-param name="max">
-
- <!-- Find the max number for reference for the bars
-
-->
-
- <xsl:for-each select="./value">
-
<xsl:sort select="@count" data-type="number" order="descending" />
-
- <xsl:if test="position() = 1">
-
<xsl:value-of select="number(@count)" />
-
</xsl:if>
-
</xsl:for-each>
-
</xsl:with-param>
-
</xsl:call-template>
-
</xsl:for-each>
-
</table>
-
</xsl:template>
-
- <xsl:template name="genline">
-
<xsl:param name="countall" />
-
<xsl:param name="max" />
-
- <xsl:for-each select="value">
-
- <tr>
-
- <!-- Print the title
-
-->
-
- <td class="FFQuickPollResultsTableColl1">
-
<xsl:value-of select="@name" />
-
</td>
-
- <!-- Print the count
-
-->
-
- <td class="FFQuickPollResultsTableColl2">
-
<xsl:value-of select="@count" />
-
<xsl:text>of</xsl:text>
-
<xsl:value-of select="$countall" />
-
</td>
-
- <!-- Print the bar representing the percent
-
-->
-
- <td class="FFQuickPollResultsTableColl3">
-
- <span class="FFQuickPollResultsBar">
-
- <xsl:attribute name="style">
-
<xsl:text>width:</xsl:text>
-
- <xsl:if test="$countall!=0">
-
<xsl:value-of select="((@count div $countall) div ($max div $countall)) * 100" />
-
</xsl:if>
-
- <xsl:if test="$countall=0">
-
<xsl:text>0</xsl:text>
-
</xsl:if>
-
<xsl:text>%</xsl:text>
-
</xsl:attribute>
-
</span>
-
</td>
-
- <!-- Print the percentage nr.
-
-->
-
- <td class="FFQuickPollResultsTableColl4">
-
- <xsl:if test="$countall!=0">
-
<xsl:value-of select="round((@count div $countall) * 100)" />
-
</xsl:if>
-
- <xsl:if test="$countall=0">
-
<xsl:text>0</xsl:text>
-
</xsl:if>
-
<xsl:text>%</xsl:text>
-
</td>
-
</tr>
-
</xsl:for-each>
-
</xsl:template>
-
</xsl:stylesheet>
Welcome to TheScripts TSDN....
Please post your XML and XSL code.
It sounds like a syntax error in XSL.
Hi Dorinbogdan,
How are you? Have you looked at the XSL code which I posted? Did you find anything wrong , please let me know , I am getting very frustrated with this problem..Actually I had solved it on development server and testing server but when it concerns with real time web server, i got the same exception!! ;-( please help me out ..
Thnaks
Prashant..
Hi,
Please forgive me, I forgot about your problem.
I hope to find few time today to overview the code (it looks quite ample).
Please post the FormDef.xml too.
And tell me what XSL throws the exception? (it seems that you posted 3 XSL files).
Thanks,
Dorin.
Hi,
Do you have the XML file, or a part of it?
I would test the XSL against XML, without java code.
Thanks,
Dorin.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Taare |
last post by:
Hi, I got
<xsl:output method="html" encoding="iso-8859-1"
doctype-public="-//W3C//DTD HTML 4.01//EN" doctype-system="
http://www.w3.org/TR/html4/strict.dtd"/>
in my XSLT file. This should remove...
|
by: Jay Allard |
last post by:
Hello
I posted this in the vb.net group on the 2/25/2004, but didn't get any
response. Here's attempt 2. Does anyone know of a more appropriate
place to post this?
One new piece of...
|
by: Keith Chadwick |
last post by:
I have a fairly hefty XSLT file that for the sake of debugging and clarity I
wish to split into some separate sub-templates contained within the same
file. The master template calls an...
|
by: Christopher M. Lauer |
last post by:
I have done my best to answer this question but can not find the
proper set of commands. I would like
to transform an xml file (in code behind) and display its output in a
specific html tag,...
|
by: Teksure |
last post by:
Hi group, searching in the Internet I found two products for XML which
incorporate a very robust debugger for XSL/XSLT, I would like you to see
these products and then, give me your opinion about...
|
by: One Handed Man \( OHM - Terry Burns \) |
last post by:
I've been battling with this stupid problem for hours now.
WebApp:
Trying to do a simple transformation using XSLT to a Web Page, but it just
failes without an error message ( In other words,...
|
by: Scamjunk |
last post by:
I have been desperately looking for a treeview-type solution for my
problem
for the past three weeks and have been greatly unsuccessful. I am
totally
new to the world of XSLT and I *don't know*...
|
by: ranadhirnag |
last post by:
We test a particular constriant in our XSLT and throw a custom exception on failure:
<xsl:when test="......">
<xsl:value-of
select="exception:throwException('Recording failed')"/>
</xsl:when>
...
|
by: Piotr |
last post by:
Hello,
i got a problem with my hosting provider and the system admin seems
not to be a top class specialist...
I'm not one myself though.
The problem is related to XSLT support in php....
|
by: ManWithNoName |
last post by:
The following question is related to this thread:
XSLT, document() function, filename, read non-standard/English characters (like µ)
I have a XML file with a non-English character in its name...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |