java - XSL transformation with xml node (key) starts with number fails -


i facing issue if xml response contains node (key) element starts number e.g. <3party /> , if try fetch node xml in xsl stylesheet fails following exception. code sample xsl 1.0 (i can't use xsl 2.0 informed in advance).

xml snippet : <root>                 <3party>some_value</3party>               </root>  xsl snippet : above value in xsl variable response.                  <xsl:variable select="$response/root/3party" /> 

transformation exception :

javax.xml.transform.transformerexception: syntax error in '$response/root/3party'. @ org.apache.xalan.xsltc.trax.transformerfactoryimpl.passerrorstolistener(transformerfactoryimpl.java:661) @ org.apache.xalan.xsltc.trax.transformerfactoryimpl.newtemplates(transformerfactoryimpl.java:836) error: thu nov 10 12:10:00 ist 2016.411 errorhandler.fatalerror(transformationconfig.java:46) thread: thread[main,5,main] - compilation of xsl stylesheet: error: not compile stylesheet  javax.xml.transform.transformerconfigurationexception: not compile stylesheet @ org.apache.xalan.xsltc.trax.transformerfactoryimpl.newtemplates(transformerfactoryimpl.java:832) 

xml elements not allowed start number. here:

xml elements must follow these naming rules: - element names case-sensitive - element names must start letter or underscore - element names cannot start letters xml (or xml, or xml, etc) - element names can contain letters, digits, hyphens, underscores, , periods - element names cannot contain spaces


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -