*Thanks for the help
Actually, it really seems to be parseXML that eats part of the node.
Here is string (perfectly consistent with the svg document)
obtained with printNode :

<g id="ann" onmouseover="self.hlp(9); " onmouseout="self.clhlp(); " 
transform="translate(0,0) scale(1,1)" onmousemove="bouger(evt)" 
onmousedown="tirer(evt)" onmouseup="lacher();"><path id="path999" 
onmouseover=" showMtag(evt) ; mycolorize(evt.target,'stroke','#ff9966') 
; " onmouseout="clearMtag(evt) ;colorize(evt.target,'stroke',colorbuff) 
; " stroke="#ff99ff" opacity="1" stroke-width="3" fill="none" d="M 340 
287 l 1 0 12 0 7 1 10 1 10 1 10 1 11 2 15 2 15 2 18 1 25 4 16 2 19 3 18 
2 12 1 12 2 8 0 5 0 4 0 1 0 "/><text id="scale999" 
style="stroke-width:0;font-family:verdana;pointer-events:none" 
opacity="1" font-size="20" font-weight="100" fill="blue" x="569" y="312" 
display="none" startOffset="0" customNS:scale="0.00433482" 
customNS:npath="1">230.69</text><path id="pl" onmouseover=" 
showMtag(evt) ; mycolorize(evt.target,'stroke','#ff9966') ; " 
onmouseout="clearMtag(evt) ;colorize(evt.target,'stroke',colorbuff) ; " 
stroke="#cc99ff" opacity="1" stroke-width="3" fill="none" d=""/><text 
id="sl" style="stroke-width:0;font-family:verdana;pointer-events:none" 
opacity="1" font-size="20" font-weight="100" fill="black" x="0" y="0" 
display="none" startOffset="0"> </text><g id="tl"><text id="tli" 
style="stroke-width:0;font-family:verdana;pointer-events:none" 
opacity="1" font-size="30" font-weight="100" fill="black" x="0" y="0" 
startOffset="0"> </text><rect onmouseover=" 
mycolorize(evt.target.previousSibling,'fill','#ff9966') ; " 
onmouseout="colorize(evt.target.previousSibling,'fill',colorbuff) ; " 
fill="none" x="0" y="0" width="0" height="0"/></g></g>



Notice the custoNS:scale and :npath attributes, roughly in the middle.
Then here is a printNode of a parseXML of the this string (again consistent
with the svg document if I insert the node in DOM tree) :

<g id="ann" onmouseover="self.hlp(9); " onmouseout="self.clhlp(); " 
transform="translate(0,0) scale(1,1)" onmousemove="bouger(evt)" 
onmousedown="tirer(evt)" onmouseup="lacher();"><path id="path999" 
onmouseover=" showMtag(evt) ; mycolorize(evt.target,'stroke','#ff9966') 
; " onmouseout="clearMtag(evt) ;colorize(evt.target,'stroke',colorbuff) 
; " stroke="#ff99ff" opacity="1" stroke-width="3" fill="none" d="M 340 
287 l 1 0 12 0 7 1 10 1 10 1 10 1 11 2 15 2 15 2 18 1 25 4 16 2 19 3 18 
2 12 1 12 2 8 0 5 0 4 0 1 0 "/><text id="scale999" 
style="stroke-width:0;font-family:verdana;pointer-events:none" 
opacity="1" font-size="20" font-weight="100" fill="blue" x="569" y="312" 
display="none" startOffset="0"/></g>

everything below the element with the custom attribute has disappeared ...
JD










From:*  "Jim Ley" <[EMAIL PROTECTED] 
<http://groups.yahoo.com/group/svg-developers/post?postID=RLrCZT855W0SWqwVKtD5le2bOn3T-Rgqh2i0ItNenW7ngSZF-_axbsL6qnKIOuPwYcxI0HtgmA>>
 

*Date:*  Tue Sep 28, 2004  3:39 pm
*Subject:*  Re: parseXML and customNS


"Jean-David Benamou" <[EMAIL PROTECTED] 
<http://groups.yahoo.com/group/svg-developers/post?postID=qal8nysYQ1B2pkX4BySMJ1OPTCAL5WKyj8uAqUoXKtQ8ne-EbLzTr-CE0Vy0KSb5yOPiJbxp1x9o0jICTyaXZDDHKw>>
 
wrote in message
news:[EMAIL PROTECTED] 
<http://groups.yahoo.com/group/svg-developers/post?postID=Fcb8e0u6lMthSJp69o6825qtrMwh-9fHqHOcyvATGrQDInRQ2JhX0daUFnzUU1qQP7nFr_lw68ODdmIon7SBMjpfWXeogQ>.
 > I have add a custom attribute to my SVG document :
 >
 > <?xml version="1.0" standalone="no"?>
 > <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 > "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";
 > [<!ATTLIST text
 > customNS:scale CDATA #IMPLIED
 > customNS:npath CDATA #IMPLIED>
 > ]>
 >
 > Now the problem occurs when I "printNode" some node
 > to a string and then "parseXML" it back :
 >
 > if the node contains one of these custom attributes then
 > parseXML skips every elements from the element containing
 > this custom attribute.

The problem is almost certainly printNode and not parseXML, printNode is a
very limited serialiser - look at what it outputs and you'll see it's often
not right if namespaces are involved. I'd look more at the printNode than
the parseXML (although that also isn't perfect) Some full documents that
fail would allow us to help more I'm sure.

Jim.

>---------------------------------------------------------~-> 
>  
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~-> 

-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
---- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/svg-developers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to