[28447] | 1 |
|
---|
| 2 |
|
---|
| 3 | For a new interface based on the 'default' interface:
|
---|
| 4 |
|
---|
| 5 | $GSDL3HOME/sites/and-sparql
|
---|
| 6 |
|
---|
| 7 | Do the following:
|
---|
| 8 |
|
---|
| 9 | 1. Create a top-level directory in the 'interfaces' folder:
|
---|
| 10 |
|
---|
| 11 | mkdir $GSDL3HOME/interfaces/and-sparql
|
---|
| 12 |
|
---|
| 13 | 2. Add in a suitable interfaceConfig.xml file:
|
---|
| 14 |
|
---|
| 15 | /bin/cp $GSDL3HOME/interfaces/default/interfaceConfig.xml $GSDL3HOME/interfaces/and-sparql/.
|
---|
| 16 |
|
---|
| 17 | 3. Edit it to include a 'baseInterface' attribute in the root element:
|
---|
| 18 |
|
---|
| 19 | emacs $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
|
---|
| 20 |
|
---|
| 21 |
|
---|
| 22 | <interfaceConfig> => <interfaceConfig baseInterface="default">
|
---|
| 23 |
|
---|
| 24 | leave the rest of the file alone
|
---|
| 25 |
|
---|
[28448] | 26 |
|
---|
| 27 | 4. Finally, edit a <servlet>...</servlet> block in:
|
---|
| 28 |
|
---|
| 29 | $GSDL3HOME/WEB-INF/web.xml:
|
---|
| 30 |
|
---|
| 31 | to use your new interface name as the 'interface_name' parameter:
|
---|
| 32 |
|
---|
| 33 |
|
---|
| 34 | <init-param>
|
---|
| 35 | <param-name>interface_name</param-name>
|
---|
| 36 | <param-value>and-sparql</param-value>
|
---|
| 37 | </init-param>
|
---|
| 38 |
|
---|
| 39 |
|
---|
[28447] | 40 | ====
|
---|
| 41 |
|
---|
| 42 | To add a new page to this interface 'sparql.xsl' do the following:
|
---|
| 43 |
|
---|
| 44 | 1. Create a pages folder:
|
---|
| 45 |
|
---|
| 46 | mkdir -p $GSDL3HOME/interfaces/and-sparql/transform/pages
|
---|
| 47 |
|
---|
| 48 | 2. Create a 'stub' page (that can be customized later on):
|
---|
| 49 |
|
---|
| 50 | /bin/cp $GSDL3HOME/interfaces/default/transform/pages/about.xsl \
|
---|
| 51 | $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
|
---|
| 52 |
|
---|
| 53 | 3. Edit the interfaceConfig.xml file to include
|
---|
| 54 |
|
---|
| 55 | emacs $GSDL3HOME/interfaces/and-sparql/interfaceConfig.xml
|
---|
| 56 |
|
---|
| 57 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
| 58 | <interfaceConfig baseInterface="default">
|
---|
| 59 | <actionList>
|
---|
| 60 | <action class="PageAction" name="p">
|
---|
| 61 | <subaction name="sparql" xslt="pages/sparql.xsl"/> <!-- **** -->
|
---|
| 62 |
|
---|
| 63 | <subaction name="home" xslt="pages/home.xsl"/>
|
---|
| 64 | <subaction name="about" xslt="pages/about.xsl"/>
|
---|
| 65 | <!-- ... -->
|
---|
| 66 |
|
---|
| 67 |
|
---|
| 68 |
|
---|
| 69 | 4. Now edit 'sparql.xsl' to include the information you want your new page to have
|
---|
| 70 |
|
---|
| 71 | emacs $GSDL3HOME/interfaces/and-sparql/transform/pages/sparql.xsl
|
---|
| 72 |
|
---|