XPath Highlighting
Are you missing a feature? Request its implementation here.
-
- Posts: 48
- Joined: Thu Mar 12, 2009 10:27 pm
XPath Highlighting
When performing an XPath query in the toolbar (e.g., "//p"), it would be nice if, when clicking on the result in the results window, only the relevant element were highlighted instead of the entire line.
e.g., if you have the following all on the same line:
then it will highlight them all. This can be problematic if one has many elements all in the same line of text.
e.g., if you have the following all on the same line:
Code: Select all
<div><h1>Title</h1><p>text1</p><p>text2</p></div>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XPath Highlighting
We try to locate the error as exactly as possible and we have special code to do that in many situations. There may be cases however that are not covered by our current implementation. Please provide a sample and we will see what can be done.
Best Regards,
George
Best Regards,
George
George Cristian Bina
-
- Posts: 48
- Joined: Thu Mar 12, 2009 10:27 pm
Re: XPath Highlighting
I've realised that this is, as far as I know, specific to the Jing parser.
If one creates a TEI Bare file from the template, then adds a <note/> element with an invalid attribute:
then if one clicks on the error (or just looks at the red underline without clicking) it highlights the entire line up to the <note> start tag, plus one character following. This behaviour seems consistent regardless of the error.
Note that if we have an empty tag (rather than a start-tag/end-tag pair) causing an error (e.g. "<ptr/>"), the one character following is no longer inside that element.
If one creates a TEI Bare file from the template, then adds a <note/> element with an invalid attribute:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_bare.rng" type="xml"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
<titleStmt>
<title>Title</title>
</titleStmt>
<publicationStmt>
<p>Publication Information</p>
</publicationStmt><sourceDesc>
<p>Information about the source</p>
</sourceDesc></fileDesc>
</teiHeader>
<text>
<body>
<p>Some text here<note test="123">abc</note></p>
</body>
</text>
</TEI>
Note that if we have an empty tag (rather than a start-tag/end-tag pair) causing an error (e.g. "<ptr/>"), the one character following is no longer inside that element.
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: XPath Highlighting
Thanks!
I will log an enhancement request to try to locate better the errors reported by Jing.
The processing I referred to in my previous message applies for XML Schema and DTD related errors.
Best Regards,
George
I will log an enhancement request to try to locate better the errors reported by Jing.
The processing I referred to in my previous message applies for XML Schema and DTD related errors.
Best Regards,
George
George Cristian Bina
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