You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by jiang lei <ji...@8107.co.jp> on 2003/05/23 10:04:52 UTC

adoptNode not implemented?

Hi all,

I was trying to move a subtree from a document to another using
DOMDocument::adoptNode() when I got DOMException::NOT_SUPPORTED_ERR.

The code of adoptNode() in release 2.2.0 remains the same with 2.1.0. Does
that mean the operation is still not supported by now? Or is there any
alternative to that?

Any hint will be appreciated.

regards

Lei


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Re: problem with offsets

Posted by Khaled Noaman <kn...@ca.ibm.com>.
By default, the parser does not do any src offset calculation.
You need to enable the calculation by setting a SAX2 feature,
XMLUni::fgXercesCalculateSrcOfs, to true.

Khaled

Marc Seldin wrote:

> I'm trying to find tags along with offsets. I've modified the included
> sax2count sample to report offsets as they are encountered by calling the
> parser->getSrcOffsets method. I get the following error:
>
>   Message: An exception occurred! Type:RuntimeException, Message:The current
> transcoding service does not support source offset information
>
> Any ideas?
>
> Incidentally, if anyone has any sample code that shows the proper way to do
> what I'm trying, I'd appreciate seeing it. Especially anything using xpath
> evaluation.
>
> > -----Original Message-----
> > From: Erik Rydgren [mailto:erik.rydgren@mandarinen.se]
> > Sent: Friday, May 23, 2003 4:28 AM
> > To: xerces-c-dev@xml.apache.org
> > Subject: RE: adoptNode not implemented?
> >
> >
> > Well since the memory management looks the way it does I believe that
> > adopyNode will not be implemented in the near future, if ever.
> >
> > Instead use importNode (deep) to make a clone of a subtree from another
> > document.
> >
> > Regards
> >
> > Erik Rydgren
> > Mandarinen systems AB
> > Sweden
> >
> >
> > -----Original Message-----
> > From: jiang lei [mailto:jiang-lei@8107.co.jp]
> > Sent: den 23 maj 2003 10:05
> > To: Xerces mailing list
> > Subject: adoptNode not implemented?
> >
> >
> > Hi all,
> >
> > I was trying to move a subtree from a document to another using
> > DOMDocument::adoptNode() when I got DOMException::NOT_SUPPORTED_ERR.
> >
> > The code of adoptNode() in release 2.2.0 remains the same with 2.1.0. Does
> > that mean the operation is still not supported by now? Or is there any
> > alternative to that?
> >
> > Any hint will be appreciated.
> >
> > regards
> >
> > Lei
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


problem with offsets

Posted by Marc Seldin <ms...@bbn.com>.
I'm trying to find tags along with offsets. I've modified the included
sax2count sample to report offsets as they are encountered by calling the
parser->getSrcOffsets method. I get the following error:

  Message: An exception occurred! Type:RuntimeException, Message:The current
transcoding service does not support source offset information

Any ideas?

Incidentally, if anyone has any sample code that shows the proper way to do
what I'm trying, I'd appreciate seeing it. Especially anything using xpath
evaluation.


> -----Original Message-----
> From: Erik Rydgren [mailto:erik.rydgren@mandarinen.se]
> Sent: Friday, May 23, 2003 4:28 AM
> To: xerces-c-dev@xml.apache.org
> Subject: RE: adoptNode not implemented?
>
>
> Well since the memory management looks the way it does I believe that
> adopyNode will not be implemented in the near future, if ever.
>
> Instead use importNode (deep) to make a clone of a subtree from another
> document.
>
> Regards
>
> Erik Rydgren
> Mandarinen systems AB
> Sweden
>
>
> -----Original Message-----
> From: jiang lei [mailto:jiang-lei@8107.co.jp]
> Sent: den 23 maj 2003 10:05
> To: Xerces mailing list
> Subject: adoptNode not implemented?
>
>
> Hi all,
>
> I was trying to move a subtree from a document to another using
> DOMDocument::adoptNode() when I got DOMException::NOT_SUPPORTED_ERR.
>
> The code of adoptNode() in release 2.2.0 remains the same with 2.1.0. Does
> that mean the operation is still not supported by now? Or is there any
> alternative to that?
>
> Any hint will be appreciated.
>
> regards
>
> Lei
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: adoptNode not implemented?

Posted by Erik Rydgren <er...@mandarinen.se>.
Well since the memory management looks the way it does I believe that
adopyNode will not be implemented in the near future, if ever.

Instead use importNode (deep) to make a clone of a subtree from another
document.

Regards

Erik Rydgren
Mandarinen systems AB
Sweden


-----Original Message-----
From: jiang lei [mailto:jiang-lei@8107.co.jp]
Sent: den 23 maj 2003 10:05
To: Xerces mailing list
Subject: adoptNode not implemented?


Hi all,

I was trying to move a subtree from a document to another using
DOMDocument::adoptNode() when I got DOMException::NOT_SUPPORTED_ERR.

The code of adoptNode() in release 2.2.0 remains the same with 2.1.0. Does
that mean the operation is still not supported by now? Or is there any
alternative to that?

Any hint will be appreciated.

regards

Lei


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org