1. /*
  2. * The Apache Software License, Version 1.1
  3. *
  4. *
  5. * Copyright (c) 1999 The Apache Software Foundation. All rights
  6. * reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in
  17. * the documentation and/or other materials provided with the
  18. * distribution.
  19. *
  20. * 3. The end-user documentation included with the redistribution,
  21. * if any, must include the following acknowledgment:
  22. * "This product includes software developed by the
  23. * Apache Software Foundation (http://www.apache.org/)."
  24. * Alternately, this acknowledgment may appear in the software itself,
  25. * if and wherever such third-party acknowledgments normally appear.
  26. *
  27. * 4. The names "Xalan" and "Apache Software Foundation" must
  28. * not be used to endorse or promote products derived from this
  29. * software without prior written permission. For written
  30. * permission, please contact apache@apache.org.
  31. *
  32. * 5. Products derived from this software may not be called "Apache",
  33. * nor may "Apache" appear in their name, without prior written
  34. * permission of the Apache Software Foundation.
  35. *
  36. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  37. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  38. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39. * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  40. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  41. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  42. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  43. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  44. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  45. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  46. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  47. * SUCH DAMAGE.
  48. * ====================================================================
  49. *
  50. * This software consists of voluntary contributions made by many
  51. * individuals on behalf of the Apache Software Foundation and was
  52. * originally based on software copyright (c) 1999, Lotus
  53. * Development Corporation., http://www.lotus.com. For more
  54. * information on the Apache Software Foundation, please see
  55. * <http://www.apache.org/>.
  56. */
  57. package org.apache.xml.utils;
  58. import org.w3c.dom.*;
  59. import org.apache.xalan.res.XSLTErrorResources;
  60. import org.apache.xalan.res.XSLMessages;
  61. /**
  62. * <meta name="usage" content="internal"/>
  63. * To be subclassed by classes that wish to fake being nodes.
  64. */
  65. public class UnImplNode implements Node, Element, NodeList, Document
  66. {
  67. /**
  68. * Constructor UnImplNode
  69. *
  70. */
  71. public UnImplNode(){}
  72. /**
  73. * Throw an error.
  74. *
  75. * @param msg Message Key for the error
  76. */
  77. public void error(String msg)
  78. {
  79. System.out.println("DOM ERROR! class: " + this.getClass().getName());
  80. throw new RuntimeException(XSLMessages.createMessage(msg, null));
  81. }
  82. /**
  83. * Throw an error.
  84. *
  85. * @param msg Message Key for the error
  86. * @param args Array of arguments to be used in the error message
  87. */
  88. public void error(String msg, Object[] args)
  89. {
  90. System.out.println("DOM ERROR! class: " + this.getClass().getName());
  91. throw new RuntimeException(XSLMessages.createMessage(msg, args)); //"UnImplNode error: "+msg);
  92. }
  93. /**
  94. * Unimplemented. See org.w3c.dom.Node
  95. *
  96. * @param newChild New node to append to the list of this node's children
  97. *
  98. * @return null
  99. *
  100. * @throws DOMException
  101. */
  102. public Node appendChild(Node newChild) throws DOMException
  103. {
  104. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"appendChild not supported!");
  105. return null;
  106. }
  107. /**
  108. * Unimplemented. See org.w3c.dom.Node
  109. *
  110. * @return false
  111. */
  112. public boolean hasChildNodes()
  113. {
  114. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasChildNodes not supported!");
  115. return false;
  116. }
  117. /**
  118. * Unimplemented. See org.w3c.dom.Node
  119. *
  120. * @return 0
  121. */
  122. public short getNodeType()
  123. {
  124. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeType not supported!");
  125. return 0;
  126. }
  127. /**
  128. * Unimplemented. See org.w3c.dom.Node
  129. *
  130. * @return null
  131. */
  132. public Node getParentNode()
  133. {
  134. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getParentNode not supported!");
  135. return null;
  136. }
  137. /**
  138. * Unimplemented. See org.w3c.dom.Node
  139. *
  140. * @return null
  141. */
  142. public NodeList getChildNodes()
  143. {
  144. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getChildNodes not supported!");
  145. return null;
  146. }
  147. /**
  148. * Unimplemented. See org.w3c.dom.Node
  149. *
  150. * @return null
  151. */
  152. public Node getFirstChild()
  153. {
  154. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getFirstChild not supported!");
  155. return null;
  156. }
  157. /**
  158. * Unimplemented. See org.w3c.dom.Node
  159. *
  160. * @return null
  161. */
  162. public Node getLastChild()
  163. {
  164. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLastChild not supported!");
  165. return null;
  166. }
  167. /**
  168. * Unimplemented. See org.w3c.dom.Node
  169. *
  170. * @return null
  171. */
  172. public Node getNextSibling()
  173. {
  174. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNextSibling not supported!");
  175. return null;
  176. }
  177. /**
  178. * Unimplemented. See org.w3c.dom.NodeList
  179. *
  180. * @return 0
  181. */
  182. public int getLength()
  183. {
  184. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLength not supported!");
  185. return 0;
  186. } // getLength():int
  187. /**
  188. * Unimplemented. See org.w3c.dom.NodeList
  189. *
  190. * @param index index of a child of this node in its list of children
  191. *
  192. * @return null
  193. */
  194. public Node item(int index)
  195. {
  196. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"item not supported!");
  197. return null;
  198. } // item(int):Node
  199. /**
  200. * Unimplemented. See org.w3c.dom.Node
  201. *
  202. * @return null
  203. */
  204. public Document getOwnerDocument()
  205. {
  206. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getOwnerDocument not supported!");
  207. return null;
  208. }
  209. /**
  210. * Unimplemented. See org.w3c.dom.Node
  211. *
  212. * @return null
  213. */
  214. public String getTagName()
  215. {
  216. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getTagName not supported!");
  217. return null;
  218. }
  219. /**
  220. * Unimplemented. See org.w3c.dom.Node
  221. *
  222. * @return null
  223. */
  224. public String getNodeName()
  225. {
  226. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeName not supported!");
  227. return null;
  228. }
  229. /** Unimplemented. See org.w3c.dom.Node */
  230. public void normalize()
  231. {
  232. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"normalize not supported!");
  233. }
  234. /**
  235. * Unimplemented. See org.w3c.dom.Element
  236. *
  237. * @param name Name of the element
  238. *
  239. * @return null
  240. */
  241. public NodeList getElementsByTagName(String name)
  242. {
  243. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getElementsByTagName not supported!");
  244. return null;
  245. }
  246. /**
  247. * Unimplemented. See org.w3c.dom.Element
  248. *
  249. * @param oldAttr Attribute to be removed from this node's list of attributes
  250. *
  251. * @return null
  252. *
  253. * @throws DOMException
  254. */
  255. public Attr removeAttributeNode(Attr oldAttr) throws DOMException
  256. {
  257. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttributeNode not supported!");
  258. return null;
  259. }
  260. /**
  261. * Unimplemented. See org.w3c.dom.Element
  262. *
  263. * @param newAttr Attribute node to be added to this node's list of attributes
  264. *
  265. * @return null
  266. *
  267. * @throws DOMException
  268. */
  269. public Attr setAttributeNode(Attr newAttr) throws DOMException
  270. {
  271. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNode not supported!");
  272. return null;
  273. }
  274. /**
  275. * Unimplemented. See org.w3c.dom.Element
  276. *
  277. *
  278. * @param name Name of an attribute
  279. *
  280. * @return false
  281. */
  282. public boolean hasAttribute(String name)
  283. {
  284. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttribute not supported!");
  285. return false;
  286. }
  287. /**
  288. * Unimplemented. See org.w3c.dom.Element
  289. *
  290. *
  291. * @param name
  292. * @param x
  293. *
  294. * @return false
  295. */
  296. public boolean hasAttributeNS(String name, String x)
  297. {
  298. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttributeNS not supported!");
  299. return false;
  300. }
  301. /**
  302. * Unimplemented. See org.w3c.dom.Element
  303. *
  304. *
  305. * @param name Attribute node name
  306. *
  307. * @return null
  308. */
  309. public Attr getAttributeNode(String name)
  310. {
  311. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNode not supported!");
  312. return null;
  313. }
  314. /**
  315. * Unimplemented. See org.w3c.dom.Element
  316. *
  317. * @param name Attribute node name to remove from list of attributes
  318. *
  319. * @throws DOMException
  320. */
  321. public void removeAttribute(String name) throws DOMException
  322. {
  323. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttribute not supported!");
  324. }
  325. /**
  326. * Unimplemented. See org.w3c.dom.Element
  327. *
  328. * @param name Name of attribute to set
  329. * @param value Value of attribute
  330. *
  331. * @throws DOMException
  332. */
  333. public void setAttribute(String name, String value) throws DOMException
  334. {
  335. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttribute not supported!");
  336. }
  337. /**
  338. * Unimplemented. See org.w3c.dom.Element
  339. *
  340. * @param name Name of attribute to get
  341. *
  342. * @return null
  343. */
  344. public String getAttribute(String name)
  345. {
  346. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttribute not supported!");
  347. return null;
  348. }
  349. /**
  350. * Unimplemented. Introduced in DOM Level 2.
  351. *
  352. * @return false
  353. */
  354. public boolean hasAttributes()
  355. {
  356. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttributes not supported!");
  357. return false;
  358. }
  359. /**
  360. * Unimplemented. See org.w3c.dom.Element
  361. *
  362. * @param namespaceURI Namespace URI of the element
  363. * @param localName Local part of qualified name of the element
  364. *
  365. * @return null
  366. */
  367. public NodeList getElementsByTagNameNS(String namespaceURI,
  368. String localName)
  369. {
  370. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getElementsByTagNameNS not supported!");
  371. return null;
  372. }
  373. /**
  374. * Unimplemented. See org.w3c.dom.Element
  375. *
  376. * @param newAttr Attribute to set
  377. *
  378. * @return null
  379. *
  380. * @throws DOMException
  381. */
  382. public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
  383. {
  384. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNodeNS not supported!");
  385. return null;
  386. }
  387. /**
  388. * Unimplemented. See org.w3c.dom.Element
  389. *
  390. * @param namespaceURI Namespace URI of attribute node to get
  391. * @param localName Local part of qualified name of attribute node to get
  392. *
  393. * @return null
  394. */
  395. public Attr getAttributeNodeNS(String namespaceURI, String localName)
  396. {
  397. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNodeNS not supported!");
  398. return null;
  399. }
  400. /**
  401. * Unimplemented. See org.w3c.dom.Element
  402. *
  403. * @param namespaceURI Namespace URI of attribute node to remove
  404. * @param localName Local part of qualified name of attribute node to remove
  405. *
  406. * @throws DOMException
  407. */
  408. public void removeAttributeNS(String namespaceURI, String localName)
  409. throws DOMException
  410. {
  411. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttributeNS not supported!");
  412. }
  413. /**
  414. * Unimplemented. See org.w3c.dom.Element
  415. *
  416. * @param namespaceURI Namespace URI of attribute node to set
  417. * @param localName Local part of qualified name of attribute node to set
  418. * NEEDSDOC @param qualifiedName
  419. * @param value value of attribute
  420. *
  421. * @throws DOMException
  422. */
  423. public void setAttributeNS(
  424. String namespaceURI, String qualifiedName, String value)
  425. throws DOMException
  426. {
  427. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNS not supported!");
  428. }
  429. /**
  430. * Unimplemented. See org.w3c.dom.Element
  431. *
  432. * @param namespaceURI Namespace URI of attribute node to get
  433. * @param localName Local part of qualified name of attribute node to get
  434. *
  435. * @return null
  436. */
  437. public String getAttributeNS(String namespaceURI, String localName)
  438. {
  439. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNS not supported!");
  440. return null;
  441. }
  442. /**
  443. * Unimplemented. See org.w3c.dom.Node
  444. *
  445. * @return null
  446. */
  447. public Node getPreviousSibling()
  448. {
  449. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getPreviousSibling not supported!");
  450. return null;
  451. }
  452. /**
  453. * Unimplemented. See org.w3c.dom.Node
  454. *
  455. * @param deep Flag indicating whether to clone deep (clone member variables)
  456. *
  457. * @return null
  458. */
  459. public Node cloneNode(boolean deep)
  460. {
  461. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"cloneNode not supported!");
  462. return null;
  463. }
  464. /**
  465. * Unimplemented. See org.w3c.dom.Node
  466. *
  467. * @return null
  468. *
  469. * @throws DOMException
  470. */
  471. public String getNodeValue() throws DOMException
  472. {
  473. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeValue not supported!");
  474. return null;
  475. }
  476. /**
  477. * Unimplemented. See org.w3c.dom.Node
  478. *
  479. * @param nodeValue Value to set this node to
  480. *
  481. * @throws DOMException
  482. */
  483. public void setNodeValue(String nodeValue) throws DOMException
  484. {
  485. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setNodeValue not supported!");
  486. }
  487. /**
  488. * Unimplemented. See org.w3c.dom.Node
  489. *
  490. *
  491. * NEEDSDOC @param value
  492. * @return value Node value
  493. *
  494. * @throws DOMException
  495. */
  496. // public String getValue ()
  497. // {
  498. // error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getValue not supported!");
  499. // return null;
  500. // }
  501. /**
  502. * Unimplemented. See org.w3c.dom.Node
  503. *
  504. * @param value Value to set this node to
  505. *
  506. * @throws DOMException
  507. */
  508. public void setValue(String value) throws DOMException
  509. {
  510. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setValue not supported!");
  511. }
  512. /**
  513. * Returns the name of this attribute.
  514. *
  515. * @return the name of this attribute.
  516. */
  517. // public String getName()
  518. // {
  519. // return this.getNodeName();
  520. // }
  521. /**
  522. * Unimplemented. See org.w3c.dom.Node
  523. *
  524. * @return null
  525. */
  526. public Element getOwnerElement()
  527. {
  528. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getOwnerElement not supported!");
  529. return null;
  530. }
  531. /**
  532. * Unimplemented. See org.w3c.dom.Node
  533. *
  534. * @return False
  535. */
  536. public boolean getSpecified()
  537. {
  538. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setValue not supported!");
  539. return false;
  540. }
  541. /**
  542. * Unimplemented. See org.w3c.dom.Node
  543. *
  544. * @return null
  545. */
  546. public NamedNodeMap getAttributes()
  547. {
  548. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributes not supported!");
  549. return null;
  550. }
  551. /**
  552. * Unimplemented. See org.w3c.dom.Node
  553. *
  554. * @param newChild New child node to insert
  555. * @param refChild Insert in front of this child
  556. *
  557. * @return null
  558. *
  559. * @throws DOMException
  560. */
  561. public Node insertBefore(Node newChild, Node refChild) throws DOMException
  562. {
  563. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"insertBefore not supported!");
  564. return null;
  565. }
  566. /**
  567. * Unimplemented. See org.w3c.dom.Node
  568. *
  569. * @param newChild Replace existing child with this one
  570. * @param oldChild Existing child to be replaced
  571. *
  572. * @return null
  573. *
  574. * @throws DOMException
  575. */
  576. public Node replaceChild(Node newChild, Node oldChild) throws DOMException
  577. {
  578. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
  579. return null;
  580. }
  581. /**
  582. * Unimplemented. See org.w3c.dom.Node
  583. *
  584. * @param oldChild Child to be removed
  585. *
  586. * @return null
  587. *
  588. * @throws DOMException
  589. */
  590. public Node removeChild(Node oldChild) throws DOMException
  591. {
  592. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
  593. return null;
  594. }
  595. /**
  596. * Tests whether the DOM implementation implements a specific feature and
  597. * that feature is supported by this node.
  598. * @param featureThe name of the feature to test. This is the same name
  599. * which can be passed to the method <code>hasFeature</code> on
  600. * <code>DOMImplementation</code>.
  601. * @param versionThis is the version number of the feature to test. In
  602. * Level 2, version 1, this is the string "2.0". If the version is not
  603. * specified, supporting any version of the feature will cause the
  604. * method to return <code>true</code>.
  605. *
  606. * NEEDSDOC @param feature
  607. * NEEDSDOC @param version
  608. * @return Returns <code>false</code>
  609. * @since DOM Level 2
  610. */
  611. public boolean isSupported(String feature, String version)
  612. {
  613. return false;
  614. }
  615. /**
  616. * Unimplemented. See org.w3c.dom.Node
  617. *
  618. * @return null
  619. */
  620. public String getNamespaceURI()
  621. {
  622. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNamespaceURI not supported!");
  623. return null;
  624. }
  625. /**
  626. * Unimplemented. See org.w3c.dom.Node
  627. *
  628. * @return null
  629. */
  630. public String getPrefix()
  631. {
  632. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getPrefix not supported!");
  633. return null;
  634. }
  635. /**
  636. * Unimplemented. See org.w3c.dom.Node
  637. *
  638. * @param prefix Prefix to set for this node
  639. *
  640. * @throws DOMException
  641. */
  642. public void setPrefix(String prefix) throws DOMException
  643. {
  644. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setPrefix not supported!");
  645. }
  646. /**
  647. * Unimplemented. See org.w3c.dom.Node
  648. *
  649. * @return null
  650. */
  651. public String getLocalName()
  652. {
  653. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLocalName not supported!");
  654. return null;
  655. }
  656. /**
  657. * Unimplemented. See org.w3c.dom.Document
  658. *
  659. * @return null
  660. */
  661. public DocumentType getDoctype()
  662. {
  663. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  664. return null;
  665. }
  666. /**
  667. * Unimplemented. See org.w3c.dom.Document
  668. *
  669. * @return null
  670. */
  671. public DOMImplementation getImplementation()
  672. {
  673. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  674. return null;
  675. }
  676. /**
  677. * Unimplemented. See org.w3c.dom.Document
  678. *
  679. * @return null
  680. */
  681. public Element getDocumentElement()
  682. {
  683. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  684. return null;
  685. }
  686. /**
  687. * Unimplemented. See org.w3c.dom.Document
  688. *
  689. * @param tagName Element tag name
  690. *
  691. * @return null
  692. *
  693. * @throws DOMException
  694. */
  695. public Element createElement(String tagName) throws DOMException
  696. {
  697. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  698. return null;
  699. }
  700. /**
  701. * Unimplemented. See org.w3c.dom.Document
  702. *
  703. * @return null
  704. */
  705. public DocumentFragment createDocumentFragment()
  706. {
  707. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  708. return null;
  709. }
  710. /**
  711. * Unimplemented. See org.w3c.dom.Document
  712. *
  713. * @param data Data for text node
  714. *
  715. * @return null
  716. */
  717. public Text createTextNode(String data)
  718. {
  719. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  720. return null;
  721. }
  722. /**
  723. * Unimplemented. See org.w3c.dom.Document
  724. *
  725. * @param data Data for comment
  726. *
  727. * @return null
  728. */
  729. public Comment createComment(String data)
  730. {
  731. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  732. return null;
  733. }
  734. /**
  735. * Unimplemented. See org.w3c.dom.Document
  736. *
  737. * @param data Data for CDATA section
  738. *
  739. * @return null
  740. *
  741. * @throws DOMException
  742. */
  743. public CDATASection createCDATASection(String data) throws DOMException
  744. {
  745. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  746. return null;
  747. }
  748. /**
  749. * Unimplemented. See org.w3c.dom.Document
  750. *
  751. * @param target Target for Processing instruction
  752. * @param data Data for Processing instruction
  753. *
  754. * @return null
  755. *
  756. * @throws DOMException
  757. */
  758. public ProcessingInstruction createProcessingInstruction(
  759. String target, String data) throws DOMException
  760. {
  761. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  762. return null;
  763. }
  764. /**
  765. * Unimplemented. See org.w3c.dom.Document
  766. *
  767. * @param name Attribute name
  768. *
  769. * @return null
  770. *
  771. * @throws DOMException
  772. */
  773. public Attr createAttribute(String name) throws DOMException
  774. {
  775. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  776. return null;
  777. }
  778. /**
  779. * Unimplemented. See org.w3c.dom.Document
  780. *
  781. * @param name Entity Reference name
  782. *
  783. * @return null
  784. *
  785. * @throws DOMException
  786. */
  787. public EntityReference createEntityReference(String name)
  788. throws DOMException
  789. {
  790. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  791. return null;
  792. }
  793. /**
  794. * Unimplemented. See org.w3c.dom.Document
  795. *
  796. * @param importedNodeThe node to import.
  797. * @param deepIf <code>true</code>, recursively import the subtree under
  798. * the specified node; if <code>false</code>, import only the node
  799. * itself, as explained above. This has no effect on <code>Attr</code>
  800. * , <code>EntityReference</code>, and <code>Notation</code> nodes.
  801. *
  802. * NEEDSDOC @param importedNode
  803. * NEEDSDOC @param deep
  804. *
  805. * @return null
  806. *
  807. * @throws DOMException
  808. */
  809. public Node importNode(Node importedNode, boolean deep) throws DOMException
  810. {
  811. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  812. return null;
  813. }
  814. /**
  815. * Unimplemented. See org.w3c.dom.Document
  816. *
  817. * @param namespaceURI Namespace URI for the element
  818. * @param qualifiedName Qualified name of the element
  819. *
  820. * @return null
  821. *
  822. * @throws DOMException
  823. */
  824. public Element createElementNS(String namespaceURI, String qualifiedName)
  825. throws DOMException
  826. {
  827. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  828. return null;
  829. }
  830. /**
  831. * Unimplemented. See org.w3c.dom.Document
  832. *
  833. * @param namespaceURI Namespace URI of the attribute
  834. * @param qualifiedName Qualified name of the attribute
  835. *
  836. * @return null
  837. *
  838. * @throws DOMException
  839. */
  840. public Attr createAttributeNS(String namespaceURI, String qualifiedName)
  841. throws DOMException
  842. {
  843. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  844. return null;
  845. }
  846. /**
  847. * Unimplemented. See org.w3c.dom.Document
  848. *
  849. * @param elementId ID of the element to get
  850. *
  851. * @return null
  852. */
  853. public Element getElementById(String elementId)
  854. {
  855. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  856. return null;
  857. }
  858. /**
  859. * Set Node data
  860. *
  861. *
  862. * @param data data to set for this node
  863. *
  864. * @throws DOMException
  865. */
  866. public void setData(String data) throws DOMException
  867. {
  868. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  869. }
  870. /**
  871. * Unimplemented.
  872. *
  873. * @param offset Start offset of substring to extract.
  874. * @param count The length of the substring to extract.
  875. *
  876. * @return null
  877. *
  878. * @throws DOMException
  879. */
  880. public String substringData(int offset, int count) throws DOMException
  881. {
  882. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  883. return null;
  884. }
  885. /**
  886. * Unimplemented.
  887. *
  888. * @param arg String data to append
  889. *
  890. * @throws DOMException
  891. */
  892. public void appendData(String arg) throws DOMException
  893. {
  894. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  895. }
  896. /**
  897. * Unimplemented.
  898. *
  899. * @param offset Start offset of substring to insert.
  900. * @param count The length of the substring to insert.
  901. * NEEDSDOC @param arg
  902. *
  903. * @throws DOMException
  904. */
  905. public void insertData(int offset, String arg) throws DOMException
  906. {
  907. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  908. }
  909. /**
  910. * Unimplemented.
  911. *
  912. * @param offset Start offset of substring to delete.
  913. * @param count The length of the substring to delete.
  914. *
  915. * @throws DOMException
  916. */
  917. public void deleteData(int offset, int count) throws DOMException
  918. {
  919. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  920. }
  921. /**
  922. * Unimplemented.
  923. *
  924. * @param offset Start offset of substring to replace.
  925. * @param count The length of the substring to replace.
  926. * @param arg substring to replace with
  927. *
  928. * @throws DOMException
  929. */
  930. public void replaceData(int offset, int count, String arg)
  931. throws DOMException
  932. {
  933. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  934. }
  935. /**
  936. * Unimplemented.
  937. *
  938. * @param offset Offset into text to split
  939. *
  940. * @return null, unimplemented
  941. *
  942. * @throws DOMException
  943. */
  944. public Text splitText(int offset) throws DOMException
  945. {
  946. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  947. return null;
  948. }
  949. /**
  950. * NEEDSDOC Method adoptNode
  951. *
  952. *
  953. * NEEDSDOC @param source
  954. *
  955. * NEEDSDOC (adoptNode) @return
  956. *
  957. * @throws DOMException
  958. */
  959. public Node adoptNode(Node source) throws DOMException
  960. {
  961. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  962. return null;
  963. }
  964. /**
  965. * <p>EXPERIMENTAL! Based on the <a
  966. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  967. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  968. * <p>
  969. * An attribute specifying, as part of the XML declaration, the encoding
  970. * of this document. This is <code>null</code> when unspecified.
  971. * @since DOM Level 3
  972. *
  973. * NEEDSDOC ($objectName$) @return
  974. */
  975. public String getEncoding()
  976. {
  977. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  978. return null;
  979. }
  980. /**
  981. * <p>EXPERIMENTAL! Based on the <a
  982. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  983. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  984. * <p>
  985. * An attribute specifying, as part of the XML declaration, the encoding
  986. * of this document. This is <code>null</code> when unspecified.
  987. * @since DOM Level 3
  988. *
  989. * NEEDSDOC @param encoding
  990. */
  991. public void setEncoding(String encoding)
  992. {
  993. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  994. }
  995. /**
  996. * <p>EXPERIMENTAL! Based on the <a
  997. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  998. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  999. * <p>
  1000. * An attribute specifying, as part of the XML declaration, whether this
  1001. * document is standalone.
  1002. * @since DOM Level 3
  1003. *
  1004. * NEEDSDOC ($objectName$) @return
  1005. */
  1006. public boolean getStandalone()
  1007. {
  1008. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1009. return false;
  1010. }
  1011. /**
  1012. * <p>EXPERIMENTAL! Based on the <a
  1013. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  1014. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  1015. * <p>
  1016. * An attribute specifying, as part of the XML declaration, whether this
  1017. * document is standalone.
  1018. * @since DOM Level 3
  1019. *
  1020. * NEEDSDOC @param standalone
  1021. */
  1022. public void setStandalone(boolean standalone)
  1023. {
  1024. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1025. }
  1026. /**
  1027. * <p>EXPERIMENTAL! Based on the <a
  1028. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  1029. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  1030. * <p>
  1031. * An attribute specifying whether errors checking is enforced or not.
  1032. * When set to <code>false</code>, the implementation is free to not
  1033. * test every possible error case normally defined on DOM operations,
  1034. * and not raise any <code>DOMException</code>. In case of error, the
  1035. * behavior is undefined. This attribute is <code>true</code> by
  1036. * defaults.
  1037. * @since DOM Level 3
  1038. *
  1039. * NEEDSDOC ($objectName$) @return
  1040. */
  1041. public boolean getStrictErrorChecking()
  1042. {
  1043. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1044. return false;
  1045. }
  1046. /**
  1047. * <p>EXPERIMENTAL! Based on the <a
  1048. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  1049. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  1050. * <p>
  1051. * An attribute specifying whether errors checking is enforced or not.
  1052. * When set to <code>false</code>, the implementation is free to not
  1053. * test every possible error case normally defined on DOM operations,
  1054. * and not raise any <code>DOMException</code>. In case of error, the
  1055. * behavior is undefined. This attribute is <code>true</code> by
  1056. * defaults.
  1057. * @since DOM Level 3
  1058. *
  1059. * NEEDSDOC @param strictErrorChecking
  1060. */
  1061. public void setStrictErrorChecking(boolean strictErrorChecking)
  1062. {
  1063. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1064. }
  1065. /**
  1066. * <p>EXPERIMENTAL! Based on the <a
  1067. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  1068. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  1069. * <p>
  1070. * An attribute specifying, as part of the XML declaration, the version
  1071. * number of this document. This is <code>null</code> when unspecified.
  1072. * @since DOM Level 3
  1073. *
  1074. * NEEDSDOC ($objectName$) @return
  1075. */
  1076. public String getVersion()
  1077. {
  1078. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1079. return null;
  1080. }
  1081. /**
  1082. * <p>EXPERIMENTAL! Based on the <a
  1083. * href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
  1084. * Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
  1085. * <p>
  1086. * An attribute specifying, as part of the XML declaration, the version
  1087. * number of this document. This is <code>null</code> when unspecified.
  1088. * @since DOM Level 3
  1089. *
  1090. * NEEDSDOC @param version
  1091. */
  1092. public void setVersion(String version)
  1093. {
  1094. error(XSLTErrorResources.ER_FUNCTION_NOT_SUPPORTED);
  1095. }
  1096. }