xml editor

Products

Features

  EPUB
Supported platforms

Supports Windows 7 & Mac OS X Lion

Ready for XML Editor data server software
W3C Member

XPath Highlighting

Are you missing a feature? Request it's implementation here.

XPath Highlighting

Postby solarian » Mon Dec 14, 2009 5:12 am

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:
Code: Select all
<div><h1>Title</h1><p>text1</p><p>text2</p></div>

then it will highlight them all. This can be problematic if one has many elements all in the same line of text.
solarian
 
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: XPath Highlighting

Postby george » Mon Dec 14, 2009 12:27 pm

Hi,

This functionality will be available in version 11.1 later this week.

Best Regards,
George
George Cristian Bina
george
Site Admin
 
Posts: 2028
Joined: Thu Jan 09, 2003 2:58 pm

Re: XPath Highlighting

Postby solarian » Mon Dec 14, 2009 12:59 pm

Excellent! This will be a great advantage.
solarian
 
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: XPath Highlighting

Postby solarian » Tue Dec 15, 2009 2:56 am

By the way, if it's also possible to get the same functionality when clicking on error messages, that would be similarly useful.
solarian
 
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: XPath Highlighting

Postby george » Tue Dec 15, 2009 3:16 pm

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
George Cristian Bina
george
Site Admin
 
Posts: 2028
Joined: Thu Jan 09, 2003 2:58 pm

Re: XPath Highlighting

Postby solarian » Tue Dec 15, 2009 10:32 pm

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:
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>


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.
solarian
 
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: XPath Highlighting

Postby george » Tue Dec 15, 2009 10:58 pm

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
George Cristian Bina
george
Site Admin
 
Posts: 2028
Joined: Thu Jan 09, 2003 2:58 pm

Re: XPath Highlighting

Postby solarian » Tue Dec 15, 2009 11:53 pm

Thanks -- much appreciated.
solarian
 
Posts: 48
Joined: Thu Mar 12, 2009 10:27 pm

Re: XPath Highlighting

Postby Radu » Tue Aug 31, 2010 4:36 pm

Hi,

Oxygen 12 (which will appear in a couple of weeks) will report more precisely such errors.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
 
Posts: 1374
Joined: Fri Jul 09, 2004 5:18 pm


Return to Feature Request

Who is online

Users browsing this forum: No registered users and 0 guests

XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor