0

I have the following build.xml file in my project's root directory (the file is taken from Phing's manual):

<?xml version="1.0" encoding="UTF-8"?> 
<?xml-model href="/usr/local/php/lib/php/data/phing/etc/phing-grammar.rng" 
            type="application/xml" 
            schematypens="http://relaxng.org/ns/structure/1.0" ?>

<project name="FooBar" default="hi">
    <target name="hi">
        <echo msg="Hiiiiiiiiiiiiiiii" />
    </target>
</project>

I changed

<?xml-model href="/usr/share/php5/PEAR/data/phing/etc/phing-grammar.rng" 
                    type="application/xml" 
                    schematypens="http://relaxng.org/ns/structure/1.0" ?>

to refer to the correct path on my filesystem and confirmed that the file actually exists.

The build.xml is working correctly from the terminal and the it prints hiiiiiiiiiiiii.

My problem is 2 things:

  1. When press validate file Netbeans gives the following error:

    XML validation started.
    Checking file:/usr/local/apache2/htdocs/testComposer/build.xml...
    cvc-elt.1: Cannot find the declaration of element 'project'. [6]
    XML validation finished.

  2. I can't get Netbeans to auto complete the predefined tasks in Phing.

It seems Netbeans can't read the phing-grammar.rng file although it exists and has read permissions.

Is this a limitation of Netbeans or am I doing something wrong?

Songo
  • 5,618
  • 8
  • 58
  • 96

1 Answers1

0

The correct syntax is xlink: href. See example:

<?xml-model xlink:href="/your/path/to/phing-grammar.rng" type="application/xml" 
                    schematypens="http://relaxng.org/ns/structure/1.0" ?>
cernio
  • 304
  • 2
  • 7