facebook

[Workaround] XML Validation fails with XSLT

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #238191 Reply

    Riyad Kalla
    Member

    This message has not been recovered.

    #238580 Reply

    lkb
    Member

    When I try to add it, it wont let me use “Public ID”.

    It forces to Namespace Name.

    Then when I valitade an XSL file, it says “Validation Complete” but the box says no validator is set up for this type.

    #238581 Reply

    lkb
    Member

    Resource foo.xsl was not validated because none of the enabled validators validates that type of resource.
    Validation of resource foo.xsl is complete.

    #238588 Reply

    Riyad Kalla
    Member

    Make sure your XML validator is enabled for your project and/or globally for the workbenhc.

    #240558 Reply

    knegarpetter
    Member

    I get the same result as lkb, and i (think) have the xml validator enabled, (how do i check that)

    regards
    Petter

    #240575 Reply

    Riyad Kalla
    Member

    You can check for your project level by opening up your project properties and going to MyEclipse-Validation, if they are all grayed out then you need to navigate to Window > Prefs > MyEclipse > Validation and check there.

    #246910 Reply

    pcwappdev
    Member

    I’ve followed the instructions here, but I still get the validation error:
    2 cvc-elt.1: Cannot find the declaration of element ‘xsl:stylesheet’. article_simple.xsl pcw/web/WEB-INF/xsl line 2 February 16, 2006

    I’ve checked and I do have the xml validator enabled.

    MyEclipse version info:
    Version: 4.1.0
    Build id: 20060122-4.1-GA

    Eclipse version info:
    Version: 3.1.2
    Build id: M20060118-1600

    any ideas? this is mostly just a nuisance, but it would be nice to get rid of this nuisance.

    #246911 Reply

    Riyad Kalla
    Member

    pcwappdev,
    Be sure to clear your error markers then re-run validation. MyEclipse > Remove All Error Markers

    #246913 Reply

    pcwappdev
    Member

    i didn’t have an option to remove all error markers, I right clicked on my project clicked on MyEclipse > Remove All Validation Markers

    I then right clicked on my xsl file and clicked on “Validate XSL file”, got the same error mentioned above.

    I tried right clicking the xsl file and then clicking on MyEclipse > Run Validation, but I got the following error:
    Resource /pcw/web/WEB-INF/xsl/article_simple.xsl was not validated because none of the enabled validators validates that type of resource.
    Validation of resource /pcw/web/WEB-INF/xsl/article_simple.xsl is complete.

    As I mentioned, xml validation is enabled for this project.

    Thanks for the quick response

    #246914 Reply

    Riyad Kalla
    Member

    Can you post the contents of the file so I can dump it into a project on my end and try it out?

    #246915 Reply

    pcwappdev
    Member

    the validation fails for any kind of xsl file. Here is a very simple xsl file which on my system fails validation as described above.

    <?xml version=”1.0″?>
    <xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform&#8221; version=”1.0″>
    <xsl:output method=”xml” omit-xml-declaration=”yes” />
    <xsl:variable name=”apos”>'</xsl:variable>
    <xsl:template match=”/”><xsl:apply-templates /></xsl:template>
    </xsl:stylesheet>

    #246919 Reply

    Riyad Kalla
    Member

    Did you not follow the steps outlined in the first post of this thread? I just did and the file validates fine.

    #246925 Reply

    pcwappdev
    Member

    I did follow the steps outlined in the first post of this thread, and yet my xsl file still does not validate.

    when i right click on my xsl and select “Validate XSL File”, I get:
    Severity Description Resource In Folder Location Creation Time Id
    2 cvc-elt.1: Cannot find the declaration of element ‘xsl:stylesheet’. article_simple.xsl pcw/web/WEB-INF/xsl line 2 February 16, 2006 10:17:35 PM 3366

    when I right click on my xsl and select “MyEclipse > Run Validation”, I get:
    Resource /pcw/web/WEB-INF/xsl/article_simple.xsl was not validated because none of the enabled validators validates that type of resource.
    Validation of resource /pcw/web/WEB-INF/xsl/article_simple.xsl is complete.

    I should mention that previously, I had saved this file: http://www.myeclipseide.com/examplecode/schema-for-xslt20.xsd with an .xml extension. I noticed this and changed the extension to .xsd . Once I did this, the only options I had for “Key Type” when adding this file to the xml catalog are “Schema Location” and “Namespace Location”. Currently the details for my user specified xml catalog are:
    URI: platform:/resource/pcw/web/WEB-INF/xsd/xsl-schema.xml
    Key Type: Schema Location
    Key: http://www.w3.org/1999/XSL/Transform

    But no matter what I select for Key Type, I still get the same errors when trying to validate the xsl file.

    #246928 Reply

    Riyad Kalla
    Member

    Change it to namespace, that is what I have mine set to.

    #246948 Reply

    pcwappdev
    Member

    hehehe, I figured out what it was, there was a trailing space in the key for the xml catalog, so the key was “http://www.w3.org/1999/XSL/Transform ” instead of “http://www.w3.org/1999/XSL/Transform&#8221;

    doh!

    once I removed the trailing space, the xsl file validates.

    thanks for your patience Riyad.

Viewing 15 posts - 1 through 15 (of 24 total)
Reply To: [Workaround] XML Validation fails with XSLT

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