- matching/unmatched tag highlighting
- Select Tag/Select Tag Block/Select Tag Contents
Tag matching support for XML files?
Moderator: kfury77
Forum rules
Please try to follow these guidelines. This will help to receive faster and more accurate response.
Please try to follow these guidelines. This will help to receive faster and more accurate response.
- Check the Support section of the corresponding product first. Chances are you will find your answer there;
- Do not create new topics for already reported problems. Add your comments to the existing topics instead;
- Create separate topic for each problem request. Do NOT post a number of non-related problem reports in a single topic;
- Give your topic a meaningful title. Titles such as "A question," "Bug report" and "Help!" provide others no clue what your message is about;
- Include the version number of the software you are using;
- This is not an official customer support helpdesk. If you need a prompt and official response, please contact our support team directly instead. It may take a while until you receive a reply in the forum;
Tag matching support for XML files?
I'm trying out WeBuilder 9.0.0.92 and like what I see. However, right now I'm working more with plain old XML files than HTML and it seems like a couple features aren't enabled for XML, but they are features that I would think should just come for free if they're supported for HTML:
Last edited by mwb1100 on Thu May 08, 2008 11:55 pm, edited 1 time in total.
- chrisjlocke
- Top Contributor
- Posts: 995
- Joined: Mon Aug 01, 2005 4:12 pm
- Location: Essex, UK
- Contact:
Re: Tag matching support for XML files?
Hi,
Can you remove the feature requests from your post, and instead, post them in the feature requests forum. If you leave them here, then they're going to be missed, and we won't be able to find them later. Thanks!
Can you remove the feature requests from your post, and instead, post them in the feature requests forum. If you leave them here, then they're going to be missed, and we won't be able to find them later. Thanks!
- Karlis
- Site Admin
- Posts: 3605
- Joined: Mon Jul 15, 2002 5:24 pm
- Location: Riga, Latvia, Europe
- Contact:
Re: Tag matching support for XML files?
If XML works how I think it works - there are no single tags, each tag has opening and closing tag then the matching tag algorithm should be easy to implement. Tag selection features are already available for XML.
Re: Tag matching support for XML files?
XML is much more strict than plain HTML in that all tags must be properly closed, which means either separate open/close tags or empty tags (like <someTag />).Karlis wrote:If XML works how I think it works - there are no single tags, each tag has opening and closing tag then the matching tag algorithm should be easy to implement.
As with everything there are exceptions like the XML Declaration (<?xml ...?>), entity declarations or attribute lists (<!ENTITY ...> or <!ATTRLIST ...>), CDATA sections, etc. This may make it a little trickier. And now that I think of it, I realize that this is not something 'for free' - you have a well-defined list of tags for HTML documents, but arbitrary tags for XML. I'm not sure why that did not cross my mind... I guess this whole thread should have been in the Feature Request forum instead. If a moderator wants to do that, please do.
I tried using these little bit more and found that "Select Tag" does work, and "Select Tag Block" works but only if the cursor is on the tag itself (for HTML docs the cursor can be in the tag's content area). "Select Content" does not seem to work - it's only enabled if the cursor is on the tag and does not do anything (same behavior as for HTML docs when cursor is on the tag).Karlis wrote:Tag selection features are already available for XML.
For HTML docs "Select Content" more or less works if the cursor is between the open/close tags, but on closer examination it only works fully if the tag contents contain no nested tags. I don't know if this is 'as designed', but to my mind it would be more useful if it selected the entire contents (kind of a special case of the "Select Tag" operation that simply excludes the open/close tags).
Re: Tag matching support for XML files?
working with CDATA fields is a pain in the arse. I remember having to format some XML using this a while ago.
Re: Tag matching support for XML files?
Unfortunately, empty elements (i.e., single tags) are perfectly legal in XML. Here's a sample block:Karlis wrote:If XML works how I think it works - there are no single tags, each tag has opening and closing tag then the matching tag algorithm should be easy to implement. Tag selection features are already available for XML.
Code: Select all
<xsl:variable name="myVar">
<xsl:call-template name="myTemplate">
<xsl:with-param name="myName" select="some xpath"/> <!-- EMPTY ELEMENT -->
</xsl:call-template>
</xsl:variable>
Karlis, all you'd have to check for empty elements is to see that the opening tag closes with "/>" (see this from the w3c). You think you could implement this (so I could drop Notepad++!

Jay
Last edited by Jay Q on Tue Aug 25, 2009 7:10 pm, edited 1 time in total.
-
- Posts: 88
- Joined: Sat Aug 01, 2009 4:48 am
- Location: Mountain View, CA
- Contact: