XInclude of XML document with XSLT instruction
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
XInclude of XML document with XSLT instruction
Hello!
I have XML documentA with XSLT processing_instructionA declared inside it (on the second line). Then I have XML documentB with XSLT processing_instructionB declared inside it (on the second line) with no its ow content, but XInclude element (on the third line). This XInclude element includes XML documentA as parse="xml".
But when XML documentA is included into XML documentB, XSLT processing_instruction A is not applied on XML documentA (it is not transformed before inclusion). Should documentA be transformed before inclusion or not?
I want to simulate XMLFilters as described in Xalan samples but not with Java programming. See http://xml.apache.org/xalan-j/samples.h ... xmlfilters what I want to do without Java programming (just using XSLT processor). Is it possible?)
Thank You. Stepan
I have XML documentA with XSLT processing_instructionA declared inside it (on the second line). Then I have XML documentB with XSLT processing_instructionB declared inside it (on the second line) with no its ow content, but XInclude element (on the third line). This XInclude element includes XML documentA as parse="xml".
But when XML documentA is included into XML documentB, XSLT processing_instruction A is not applied on XML documentA (it is not transformed before inclusion). Should documentA be transformed before inclusion or not?
I want to simulate XMLFilters as described in Xalan samples but not with Java programming. See http://xml.apache.org/xalan-j/samples.h ... xmlfilters what I want to do without Java programming (just using XSLT processor). Is it possible?)
Thank You. Stepan
-
- Posts: 83
- Joined: Fri Sep 17, 2004 10:53 am
- Location: Prague, the Czech Republic, Europe
In other word I want to do something like this:
xmlA -> (xmlA * xsltA) = xmlB -> (xmlB * xsltB) = xmlC
I want to parse xmlC and receive result, but I can not save xmlB into disk. The process has to be dynamic - xmlC does not now, how many steps (transformations) are among xmlA and xmlC. Such chaining XSLT transofrmations...
xmlA -> (xmlA * xsltA) = xmlB -> (xmlB * xsltB) = xmlC
I want to parse xmlC and receive result, but I can not save xmlB into disk. The process has to be dynamic - xmlC does not now, how many steps (transformations) are among xmlA and xmlC. Such chaining XSLT transofrmations...
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: XInclude of XML document with XSLT instruction
Post by sorin_ristache »
Hello,
Regards,
Sorin
No, XML processing instructions should not be executed when the fragment referred using XInclude is included in the main file. An XInclude reference is resolved by the XML parser but a processing instruction is handled by the application which calls the parser after the parser finished parsing the XML document. See the definition of a processing instruction in the XML specification: "Definition: Processing instructions (PIs) allow documents to contain instructions for applications.", "PIs are not part of the document's character data, but MUST be passed through to the application.", "The PI begins with a target used to identify the application to which the instruction is directed."tatra603 wrote:But when XML documentA is included into XML documentB, XSLT processing_instruction A is not applied on XML documentA (it is not transformed before inclusion). Should documentA be transformed before inclusion or not?
There is no mechanism for that in XSLT. If you do not want to use Xalan in a Java application as implementation of the org.xml.sax.XMLFilter interface you have to write a Xalan extension. If you use Xalan-J it is a Java extension, if you use Xalan-C it is a C extension.tatra603 wrote:I want to simulate XMLFilters as described in Xalan samples but not with Java programming. See http://xml.apache.org/xalan-j/samples.h ... xmlfilters what I want to do without Java programming (just using XSLT processor). Is it possible?
Regards,
Sorin
Return to “General XML Questions”
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