I'm having trouble getting the right XPath for 
an SVG file.  
What I'm trying to do is get to:

svg/metadata/variableSets/variableSet/variables/

and iterate thru the "variable" elements.

My code:
----
Document doc = builder.build(new File(fileURItoSVG));
XPath xpath = new
JDOMXPath("//metadata/variableSets/variableSet/variables");
List variables = xpath.selectNodes(doc);
----

but the variables.size() == 0

I've even tried:
svg:svg/svg:metadata/vars:variableSets/vars:variableSet/vars:variables
but with no success.
Any help greatly appreciated..

The beginning of the SVG:
------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 10.0.3, SVG Export
Plug-In . SVG Version: 3.0.0 Build 77)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"   
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";
[
        <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/";>
        <!ENTITY ns_extend
"http://ns.adobe.com/Extensibility/1.0/";>
        <!ENTITY ns_ai
"http://ns.adobe.com/AdobeIllustrator/10.0/";>
        <!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/";>
        <!ENTITY ns_vars
"http://ns.adobe.com/Variables/1.0/";>
        <!ENTITY ns_imrep
"http://ns.adobe.com/ImageReplacement/1.0/";>
        <!ENTITY ns_sfw
"http://ns.adobe.com/SaveForWeb/1.0/";>
        <!ENTITY ns_custom
"http://ns.adobe.com/GenericCustomNamespace/1.0/";>
        <!ENTITY ns_adobe_xpath
"http://ns.adobe.com/XPath/1.0/";>
        <!ENTITY ns_svg "http://www.w3.org/2000/svg";>
        <!ENTITY ns_xlink "http://www.w3.org/1999/xlink";>
]>
<svg 
         xmlns:x="&ns_extend;" xmlns:i="&ns_ai;"
xmlns:graph="&ns_graphs;" i:viewOrigin="-93.2031 0"
i:rulerOrigin="252 1098" i:pageBounds="-252 54 900
-1098" i:viewBoxInterpretation="asCropBox"
         xmlns="&ns_svg;" xmlns:xlink="&ns_xlink;"
xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/";
         width="648" height="1044" viewBox="-16.797 0 648
1044" enable-background="new -16.797 0 648 1044"
xml:space="preserve">
        <metadata>
                <variableSets 
xmlns="http://ns.adobe.com/Variables/1.0/";>
                        <variableSet  varSetName="binding1" locked="none">
                                <variables>
                                        <variable  varName="subhead" 
trait="textcontent"
category="&ns_flows;"
docRef="id('XMLID_1_')"></variable>
                                        <variable  varName="Head" trait="textcontent"
category="&ns_flows;"
docRef="id('XMLID_2_')"></variable>
                                        <variable  varName="Image" trait="fileref"
category="&ns_vars;"
docRef="id('XMLID_3_')"></variable>
                                </variables>

------------------------------

thanks again...

Paul


__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
Jaxen-interest mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxen-interest

Reply via email to