facebook

XML Validation Weirdness

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #306801 Reply

    I’m testing Tiles 2 in a small application, and have stumbled across a bug I regularly encounter.

    When editing XML files in Text Editor, I get random and inaccurate errors.

    For instance, in this simple file:

    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE tiles-definitions PUBLIC
        "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"
        "http://tiles.apache.org/dtds/tiles-config_2_0.dtd">
    
    <tiles-definitions>
    
      <definition name="commonPage" template="/layouts/classic.jsp">
        <put-attribute name="header" value="/tiles/defaultHeader.jsp" />
        <put-attribute name="menu" value="/tiles/defaultMenu.jsp" />
        <put-attribute name="footer" value="/tiles/defaultFooter.jsp" />
      </definition>
    
      <definition name="homePage" extends="commonPage">
        <put-attribute name="body" value="/tiles/home_body.jsp" />
      </definition>
      
      <definition name="aboutPage" extends="commonPage">
        <put-attribute name="body" value="/tiles/about_body.jsp" />
      </definition>
      
    </tiles-definitions>
    

    Line 12 is marked with:
    X The element type “tiles-definitions” must be terminated by the matching end-tag “</tiles-definitions>”.

    This error popped up after I added the “aboutPage” definition and I cannot get it to go away, even after restoring from a previous file and restarting MyEclipseIDE. The application ran fine on an earlier test, and the file does not appear to be incorrect.

    Help!

    Running:
    Version 8.5M2-20100212
    OSX 10.6.2

    #306832 Reply

    CasaDelNorte,
    I could not replicate this at my end. Can you give some more information?
    1. Can you copy paste your installation details from MyEclipse > Installation Summary > Installation Details?
    2. Can you list out the steps in detail to replicate the above issue?

    #306845 Reply

    Sure, however I have had this same issue in several releases on several computers. In this case, I opened the file with the XML Editor, re-saved it, and the error disappeared.

    *** Date: 
    Wednesday, March 17, 2010 12:06:54 PM CDT
    
    ** System properties:
    OS=MacOSX
    OS version=10.6.2
    Java version=1.6.0_17
    
    
    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.5M2
    Build id: 8.5M2-20100212
    
    
    *** Eclipse details:
    MyEclipse Enterprise Workbench
    
    Version: 8.5M2
    Build id: 8.5M2-20100212
    
    
    
    
    
    
    Eclipse startup command=-os
    macosx
    -ws
    carbon
    -arch
    x86
    -showsplash
    -launcher
    /Library/Genuitec/Profiles/MyEclipse 8.5 M2/myeclipse.app/Contents/MacOS/myeclipse
    -name
    Myeclipse
    --launcher.library
    /Library/Genuitec/Profiles/MyEclipse 8.5 M2/myeclipse.app/Contents/MacOS//../../../../../Common/plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.200.v20090520-1835/eclipse_1206.so
    -startup
    /Library/Genuitec/Profiles/MyEclipse 8.5 M2/myeclipse.app/Contents/MacOS/../../../../../Common/plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
    -install
    /Library/Genuitec/Profiles/MyEclipse 8.5 M2
    -configuration
    ../../../configuration
    -keyring
    /Users/larrydwilson/.eclipse_keyring
    -consoleLog
    -showlocation
    -vm
    /System/Library/Frameworks/JavaVM.framework
    
    #306850 Reply

    CasaDelNorte,

    In this case, I opened the file with the XML Editor, re-saved it, and the error disappeared.

    You can set the default editor for XML files from Window > Preferences > General > Editors > File Associations.

    #306857 Reply

    I know that. I actually prefer to edit XML in the Text Editor. That’s why this bug is so annoying.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: XML Validation Weirdness

You must be logged in to post in the forum log in