DocBook / xml:base / rename problem
DocBook / xml:base / rename problem
Greetings,
I believe there is a bug in renaming files, which have MasterFiles, and which have xml:base.
TL;DR
When renaming a file in the project browser that is xi:included using an href defined based upon xml:base, it "correctly" gives it a relative path from the current location that starts with ../. If there are multiple sub-directory levels, then there would multiple parent directory references (ie multiple ../).
This "correct" file path relative to the file which is xi:includeing it, is however incorrect from an XML xi:include perspective which is viewing relative paths based upon xml:base and not relative from the file which is referencing it.
Very simple example is shown in images below.
Initial project - three files, two sub-directories. Everything works.
Rename sec-issue.xml to sec-issue-bar.xml which gives rename preview screen shown in image below. Note that the new path, "correctly" is ../subDir2/sec-issue-bar.xml, however that is incorrect from the perspective of xi:include.
Accepting the change, obviously creates an error in attempting to include a file with a "correct" path of
../subDir2/sec-issue-bar.xml
which with the following
xml:base="/D:/Users/otto/product-bug-doc/oxygenxml/dcbk_issue-xmlbase-rename/"
results in a file path of
/D:/Users/otto/product-bug-doc/oxygenxml/dcbk_issue-xmlbase-rename/../subDir2/sec-issue-bar.xml
which is really
/D:/Users/otto/product-bug-doc/oxygenxml/subDir2/sec-issue-bar.xml
I'm going to guess that this is not simply a DocBook issue, but an issue with the use of MasterFiles, xml:base, and xi:include.
Am I correct in assuming this is a bug, or am I doing something wrong?
How might I be able to do a rename without this occurring?
Best regards,
..Otto
I believe there is a bug in renaming files, which have MasterFiles, and which have xml:base.
TL;DR
When renaming a file in the project browser that is xi:included using an href defined based upon xml:base, it "correctly" gives it a relative path from the current location that starts with ../. If there are multiple sub-directory levels, then there would multiple parent directory references (ie multiple ../).
This "correct" file path relative to the file which is xi:includeing it, is however incorrect from an XML xi:include perspective which is viewing relative paths based upon xml:base and not relative from the file which is referencing it.
Very simple example is shown in images below.
Initial project - three files, two sub-directories. Everything works.
- img-1-bk-ch-sec.png (72.55 KiB) Viewed 3596 times
Rename sec-issue.xml to sec-issue-bar.xml which gives rename preview screen shown in image below. Note that the new path, "correctly" is ../subDir2/sec-issue-bar.xml, however that is incorrect from the perspective of xi:include.
- img-2-rename-preview.png (72.6 KiB) Viewed 3596 times
Accepting the change, obviously creates an error in attempting to include a file with a "correct" path of
../subDir2/sec-issue-bar.xml
which with the following
xml:base="/D:/Users/otto/product-bug-doc/oxygenxml/dcbk_issue-xmlbase-rename/"
results in a file path of
/D:/Users/otto/product-bug-doc/oxygenxml/dcbk_issue-xmlbase-rename/../subDir2/sec-issue-bar.xml
which is really
/D:/Users/otto/product-bug-doc/oxygenxml/subDir2/sec-issue-bar.xml
- img-3-inc-path-error.png (87.46 KiB) Viewed 3596 times
I'm going to guess that this is not simply a DocBook issue, but an issue with the use of MasterFiles, xml:base, and xi:include.
Am I correct in assuming this is a bug, or am I doing something wrong?
How might I be able to do a rename without this occurring?
Best regards,
..Otto
Re: DocBook / xml:base / rename problem
Hi Otto,
You are right, the renames and moves of resources should take the xml:base into account when computing the referenced paths. I reproduced the problem on my side and added an internal issue to look into it. We'll update this forum thread when a fix is available.
Regards,
Radu
You are right, the renames and moves of resources should take the xml:base into account when computing the referenced paths. I reproduced the problem on my side and added an internal issue to look into it. We'll update this forum thread when a fix is available.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: DocBook / xml:base / rename problem
Radu, Thank you for verifying.
I look forward to a fix.
This is really important for me, since any rename needs to be manually fixed, greatly decreasing productivity.
Thank you for a great product.
Best regards,
..Otto
I look forward to a fix.
This is really important for me, since any rename needs to be manually fixed, greatly decreasing productivity.
Thank you for a great product.
Best regards,
..Otto
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