Oxygen unable to deal with empty tags when doing XInclude
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 3
- Joined: Wed Sep 13, 2006 11:41 am
Oxygen unable to deal with empty tags when doing XInclude
Hi,
I've a file containing empty tags. I want to include it in another XML using XInclude. Everything works until processor found an empty tag like this <test/>. All tags that follows this are included but without the values. Example <hello>lalala</hello> become <hello></hello>.
Changing <test/> by <test></test> solve the problem but I don't want to do this everywhere.
Further more, I can't validate my result file which contains the <xi:include> tags. I use .XSD
scheme, and i don't want to transform it to allow other kind of tags.
regards,
michael
I've a file containing empty tags. I want to include it in another XML using XInclude. Everything works until processor found an empty tag like this <test/>. All tags that follows this are included but without the values. Example <hello>lalala</hello> become <hello></hello>.
Changing <test/> by <test></test> solve the problem but I don't want to do this everywhere.
Further more, I can't validate my result file which contains the <xi:include> tags. I use .XSD
scheme, and i don't want to transform it to allow other kind of tags.
regards,
michael
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Can you post sample files for reproducing the error and the result that you get after resolving the XInclude elements ? In a simple test that I did the XInclude elements are resolved correctly if the XML document is well-formed. It is not necessary to be valid. What do you mean by result file that contains <xi:include> tags ? How do you obtain this result file ? Anyway if you want to validate it the include element of the XInclude namespace must be declared in the schema. The current version of the XML parser does not accept it without being declared.
Regards,
Sorin
Can you post sample files for reproducing the error and the result that you get after resolving the XInclude elements ? In a simple test that I did the XInclude elements are resolved correctly if the XML document is well-formed. It is not necessary to be valid. What do you mean by result file that contains <xi:include> tags ? How do you obtain this result file ? Anyway if you want to validate it the include element of the XInclude namespace must be declared in the schema. The current version of the XML parser does not accept it without being declared.
Regards,
Sorin
Last edited by sorin_ristache on Wed Sep 13, 2006 2:51 pm, edited 1 time in total.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Sorry, if you validate against an XML Schema you do not need to declare the elements of the XInclude namespace (include, fallback) in your schema. Just enable XInclude processing in <oXygen/> from Options -> Preferences -> XML / XML Parser -> Enable XInclude processing and the Validate Document action will resolve correctly xi:include elements. You need to declare the include and fallback elements only if you validate against DTD.
Regards,
Sorin
Regards,
Sorin
-
- Posts: 3
- Joined: Wed Sep 13, 2006 11:41 am
for example these 2 file (XSD, XSL are removed)
_blank.xml:
and tests.xml
result is :
you can see the text in <name> diseapear !
Regards,
Michael
_blank.xml:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<test>
<document/>
<fs>
<f>
<name>LAlalalalalallalalalla will appear in result</name>
<xml-page/>
<bundle>
<name>XMLpage is an empty tag ang this text will never appear in result</name>
</bundle>
</f>
</fs>
</test>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<test xmlns:xi="http://www.w3.org/2001/XInclude">
<document/>
<f>
<xi:include href="_blank.xml" xpointer="element(/1/2/1)">
<xi:fallback>404</xi:fallback>
</xi:include>
</f>
</test>
Code: Select all
<test> <document></document> <f> <f> <name>LAlalalalalallalalalla will appear in result</name> <xml-page></xml-page><bundle><name></name></bundle></f> </f> </test>
Regards,
Michael
Code: Select all
Code: Select all
-
- Posts: 3
- Joined: Wed Sep 13, 2006 11:41 am
if in _blank.xml i change <xml-page/> by <xml-page></xml-page>, i've :
Regards,
Michael
Code: Select all
<test> <document></document> <f> <f> <name>LAlalalalalallalalalla will appear in result</name> <xml-page></xml-page> <bundle> <name>XMLpage is an empty tag ang this text will never appear in result</name> </bundle> </f> </f> </test>
Michael
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
I reported the bug to the developers of the XInclude processor. Also we will try to fix the bug in <oXygen/> independent of the XInclude processor developers. You have to use the workaround that you found until the bug is fixed: use <xml-page></xml-page> instead of <xml-page/> in _blank.xml.
Thank you for your report,
Sorin
I reported the bug to the developers of the XInclude processor. Also we will try to fix the bug in <oXygen/> independent of the XInclude processor developers. You have to use the workaround that you found until the bug is fixed: use <xml-page></xml-page> instead of <xml-page/> in _blank.xml.
Thank you for your report,
Sorin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: Oxygen unable to deal with empty tags when doing XInclude
Post by sorin_ristache »
Hello,
Regards,
Sorin
We fixed the problem in a previous version (version 8.2). You can try the latest version from the Download page.michaelwk wrote:I've a file containing empty tags. I want to include it in another XML using XInclude. Everything works until processor found an empty tag like this <test/>. All tags that follows this are included but without the values. Example <hello>lalala</hello> become <hello></hello>.
Changing <test/> by <test></test> solve the problem but I don't want to do this everywhere.
Regards,
Sorin
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