unnecessary error for <userinput>
Oxygen general issues.
-
- Posts: 3
- Joined: Tue Oct 25, 2011 1:31 pm
unnecessary error for <userinput>
I could be wrong, but the example below shows what I think is an unnecessary error.
(The text below is cut down from a larger document.)
<section> is a valid parent for <userinput> in XML, so it doesn't need to be within a <para>. Yet the <userinput> text is flagged as an error.
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<title>On Windows</title>
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
<para>Then type:
<userinput>bin\blah.bat</userinput></para>
</section>
</chapter>
This error is only flagged sometimes (particularly with nested sections) - the example below doesn't flag an error, so I think this is an problem with oXygen.
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
<para>Then type:
<userinput>bin\blah.bat</userinput></para>
</section>
(The text below is cut down from a larger document.)
<section> is a valid parent for <userinput> in XML, so it doesn't need to be within a <para>. Yet the <userinput> text is flagged as an error.
<chapter xmlns="http://docbook.org/ns/docbook" version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink" >
<title>On Windows</title>
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
<para>Then type:
<userinput>bin\blah.bat</userinput></para>
</section>
</chapter>
This error is only flagged sometimes (particularly with nested sections) - the example below doesn't flag an error, so I think this is an problem with oXygen.
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
<para>Then type:
<userinput>bin\blah.bat</userinput></para>
</section>
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: unnecessary error for <userinput>
Hi,
According to the Docbook 5 specification for userinput:
http://www.docbook.org/tdg5/en/html/userinput.html
it can occur in the following elements:
Regards,
Radu
According to the Docbook 5 specification for userinput:
http://www.docbook.org/tdg5/en/html/userinput.html
it can occur in the following elements:
I tested both examples and they are both (correctly) flagged as errors when the userinput is directly inside the section.These elements contain userinput: bridgehead, caption (db.html.caption), citation, citetitle, classsynopsisinfo, computeroutput, emphasis (db.emphasis), entry, firstterm, funcsynopsisinfo, glosssee, glossseealso, glossterm, link, literallayout, member, olink, orgdiv, para, phrase (db.phrase), primary, primaryie, programlisting, quote, refdescriptor, refentrytitle, refname, refpurpose, screen, secondary, secondaryie, see, seealso, seealsoie, seeie, seg, segtitle, simpara, subtitle, synopsis, td, term, termdef, tertiary, tertiaryie, th, title, titleabbrev, tocentry, userinput.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 3
- Joined: Tue Oct 25, 2011 1:31 pm
Re: unnecessary error for <userinput>
hi Radu,
apologies, yes, you are correct that this should be an error, and that is the main point.
However, I was cutting down large text where sometimes it was an error, and sometimes it wasn't. If you put the following text into an standalone file, the error isn't shown. I know this may be too small a sample, so that may be the reason in this case.
<?xml version="1.0" encoding="UTF-8"?>
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
</section>
apologies, yes, you are correct that this should be an error, and that is the main point.
However, I was cutting down large text where sometimes it was an error, and sometimes it wasn't. If you put the following text into an standalone file, the error isn't shown. I know this may be too small a sample, so that may be the reason in this case.
<?xml version="1.0" encoding="UTF-8"?>
<section>
<title>On Windows</title>
<para>From a console window, change to ....</para>
<userinput>cd [install_dir]</userinput>
<para>
where ...
</para>
</section>
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: unnecessary error for <userinput>
Hi,
When an XML is opened/changed in Oxygen, Oxygen needs somehow to detect what type of vocabulary to use for validation (Docbook 4, 5, TEI, XHTML, DITA, etc).
If the XML does not explicitly specify a reference to a schema then Oxygen has special rules (located in the Document Type Association Preferences page) to determine what kind of vocabulary to use for validation.
A correct Docbook 5 section XML fragment should have had the Docbook 5 namespace declared on the root element like:
For Docbook 5 for example Oxygen looks that the XML fragment is in the Docbook 5 namespace in order to use the Docbook 5 schema for validation.
Regards,
Radu
When an XML is opened/changed in Oxygen, Oxygen needs somehow to detect what type of vocabulary to use for validation (Docbook 4, 5, TEI, XHTML, DITA, etc).
If the XML does not explicitly specify a reference to a schema then Oxygen has special rules (located in the Document Type Association Preferences page) to determine what kind of vocabulary to use for validation.
A correct Docbook 5 section XML fragment should have had the Docbook 5 namespace declared on the root element like:
Code: Select all
<section xmlns="http://docbook.org/ns/docbook">....
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ 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