Not able to group similar type elements with same value
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 6
- Joined: Tue Oct 22, 2019 12:53 pm
Not able to group similar type elements with same value
Post by javauser007 »
Hello All,
Can you please help to debug below error?
ERROR:
net.sf.saxon.trans.XPathException: Errors were reported during stylesheet compilation
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:739)
at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:155)
at org.apache.camel.builder.xml.XsltBuilder.setTransformerSource(XsltBuilder.java:352)
Wrapped by: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:742)
Note: I'm using XSLT 2.0
Please throw some light on my problem to proceed further.
Thanks in advance.
Can you please help to debug below error?
ERROR:
net.sf.saxon.trans.XPathException: Errors were reported during stylesheet compilation
at net.sf.saxon.style.StylesheetModule.loadStylesheet(StylesheetModule.java:260)
at net.sf.saxon.style.Compilation.compileSingletonPackage(Compilation.java:106)
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:739)
at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:155)
at org.apache.camel.builder.xml.XsltBuilder.setTransformerSource(XsltBuilder.java:352)
Wrapped by: net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation
at net.sf.saxon.s9api.XsltCompiler.compile(XsltCompiler.java:742)
Note: I'm using XSLT 2.0
Please throw some light on my problem to proceed further.
Thanks in advance.
Last edited by javauser007 on Tue Oct 29, 2019 1:35 pm, edited 1 time in total.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Not able to group similar type elements with same value
Hi,
Your error is of stylesheet compilation, but you omitted the details that would have shown the actual compilation problem.
Your code starts by using a variable that hasn't been declared: $relation_doc_uri So, it's impossible to say what the code does.
Maybe it's that missing declaration, maybe it's something else.
Regards,
Adrian
Your error is of stylesheet compilation, but you omitted the details that would have shown the actual compilation problem.
Your code starts by using a variable that hasn't been declared: $relation_doc_uri So, it's impossible to say what the code does.
Maybe it's that missing declaration, maybe it's something else.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 6
- Joined: Tue Oct 22, 2019 12:53 pm
Re: Not able to group similar type elements with same value
Post by javauser007 »
Hi Adrian,
I have already declared that variable and it is going inside the if condition. even I'm able to print the $relation_doc_uri . But after that it is failing.
I have already declared that variable and it is going inside the if condition. even I'm able to print the $relation_doc_uri . But after that it is failing.
-
- Posts: 6
- Joined: Tue Oct 22, 2019 12:53 pm
Re: Not able to group similar type elements with same value
Post by javauser007 »
Hi Adrian,
Thanks for the reply. I have declared the variable $relation_doc_uri and it has proper value.
But my code is not moving inside the below for loop.
<xsl:for-each-group select="$v_ownerships" group-by="source">
Thank you
Thanks for the reply. I have declared the variable $relation_doc_uri and it has proper value.
But my code is not moving inside the below for loop.
<xsl:for-each-group select="$v_ownerships" group-by="source">
Thank you
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Not able to group similar type elements with same value
Hi,
I can't debug with variables for which there is no definition.
I don't know what relation_doc_uri contains, but your XML examples don't have any elements named relations or ownerships.
Regards,
Adrian
I can't debug with variables for which there is no definition.
Code: Select all
<xsl:variable name="v_ownerships" select="$relation_doc_uri/relations/ownerships)" />
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service