Specifying filename or URL for XXE.open
I want to add a button that lets me open a file from my ditamap. 
So I've added the command button: 

@property-value open-file()
         command-button(text, "OpenFile",
                                icon, square, 
                                command, "XXE.open",
                                parameter, attr(href));


to the appropriate styles:

    topichead:before {
        content: paragraph(content(item-collapser(), " ",
element-name(), " ",
                                   " navtitle=", attr(navtitle), 
                                   " ", 
                                   drop-site(icon, icon(drop2),
                                           color, gray,
                                           command,
"ditamap.dropTopicref",
                                           parameter, "topicref
'%{value}'"), " ",open-file() ));

Unfortunately, the problem I'm having is in specifying the filename. I
want to take the value from the href attribute, which is a relative URL,
i.e. reference/r_register_requirements.dita and use it to open that
file. 
If I don't put in a parameter, I get an open file box, which is the
correct behavior. If I just put in a reference to the href attribute
(attr(href)or , "href '%{value}'"), the command button appears but
doesn't do anything. If I put in "file:///" "attr(href)" I get a message
saying it can't open the file. 

What is the filename/URL supposed to look like? I couldn't find any
examples in the doc or the samples. Can I specify this with a relative
URL? 


-----Original Message-----
From: Hussein Shafie [mailto:[email protected]] 
Sent: Wednesday, April 30, 2008 4:35 AM
To: Tyrin Avery
Cc: xmleditor-support at xmlmind.com
Subject: Re: [XXE] Where are the class names for the commands written in
the Java programming language

Tyrin Avery wrote:
> In the commands PDF, it says you have to include the java commands,
such 
> as xxe.open in the xxe configuration file. For example:
> 
> <command name="xhtml.preview">
> 
> <class>com.xmlmind.xmleditapp.xhtml.Preview</class>
> 
> </command>
> 
>  
> 
> However, the class name that has to be declared for xxe.open isn't in 
> the doc for the command. Nor is it in any of the tutorials. Where
should 
> I look for this? (and why isn't this done for me by default, it seems
an 
> odd thing to require a user to do, since these are standard xxe
functions)
> 

--> All stock commands are automatically predeclared.

* Basic commands such as insert, paste, etc, are declared by some Java
code found in xxe.jar or xxe_app.jar.

* XXE.* commands (e.g. XXE.open) are declared in the stock *.xxe_gui
files. The stock *.xxe_gui files are contained in xxe_app.jar.

* Commands specific to a document type (XHTML, DITA, DocBook, etc) are
declared in the corresponding .xxe or .incl configuration files. See
XXE_install_dir/addon/config/, DITA_addon_install_dir/, etc.

--> Your problem is probably more complex that it seems to be. Do no 
hesitate to send us another email explaining what you want to do.





Reply via email to