Schemas for code completion with xsd

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Schemas for code completion with xsd

Oktopuce
Hi all,

It's an old topic but I have a trick so that you can add Auto-complete function for fluid, vhs, flux.

First of all, download the XSD schema files from here : https://fluidtypo3.org/viewhelpers/fluid/master.html put them somewhere locally.

Next step, in Netbeans, go to menu Tools > DTD and XML Schemas, add your 3 DTD in user catalog :

Flux :
Public ID = http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers
URI = path to your flux XDS file

Fluid :
Public ID = http://typo3.org/ns/TYPO3/Fluid/ViewHelpers
URI = path to your fluid XDS file

Vhs :
Public ID = http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers
URI = path to your flux VHS file

Next, in project properties, go to 'testing' menu and add the folder where you stored your DTD.

Now, in your Project > Test Files, add a new XML Document and choose "XML Schema-Constrained Document" on next step, click the button 'Browse' and By File > Your Project > Test Files and select import for all the xsd schema files.

Then, change the prefix f for fluid, flux for flux and vhs for vhs choose fluid as primary and finish.

A file is created with this content :


Code:
<f:alias
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xmlns:f='http://typo3.org/ns/TYPO3/Fluid/ViewHelpers'
        xmlns:vhs='http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers'
        xmlns:flux='http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers'
        xsi:schemaLocation='http://typo3.org/ns/TYPO3/Fluid/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Fluid.xsd
   http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Vhs.xsd
   http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers file:/home/florian/Documents/Docs/Netbeans/Autocomplete%20Fluid/Schemas/Flux.xsd'>
   
        Auto-completion here
       
</f:alias>



And into the section <f:alias>, you have the auto-completion for fluid, vhs and flux.

I also suggest to use the Netbeans plugin : http://plugins.netbeans.org/plugin/41543/typoscript-support-for-netbeans-ide

Florian




Loading...