OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libjava/] [classpath/] [gnu/] [xml/] [transform/] [TransformerImpl.java] - Blame information for rev 14

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jlechner
/* TransformerImpl.java --
2
   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3
 
4
This file is part of GNU Classpath.
5
 
6
GNU Classpath is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 2, or (at your option)
9
any later version.
10
 
11
GNU Classpath is distributed in the hope that it will be useful, but
12
WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
General Public License for more details.
15
 
16
You should have received a copy of the GNU General Public License
17
along with GNU Classpath; see the file COPYING.  If not, write to the
18
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19
02110-1301 USA.
20
 
21
Linking this library statically or dynamically with other modules is
22
making a combined work based on this library.  Thus, the terms and
23
conditions of the GNU General Public License cover the whole
24
combination.
25
 
26
As a special exception, the copyright holders of this library give you
27
permission to link this library with independent modules to produce an
28
executable, regardless of the license terms of these independent
29
modules, and to copy and distribute the resulting executable under
30
terms of your choice, provided that you also meet, for each linked
31
independent module, the terms and conditions of the license of that
32
module.  An independent module is a module which is not derived from
33
or based on this library.  If you modify this library, you may extend
34
this exception to your version of the library, but you are not
35
obligated to do so.  If you do not wish to do so, delete this
36
exception statement from your version. */
37
 
38
package gnu.xml.transform;
39
 
40
import java.io.BufferedOutputStream;
41
import java.io.FileOutputStream;
42
import java.io.IOException;
43
import java.io.OutputStream;
44
import java.io.UnsupportedEncodingException;
45
import java.io.Writer;
46
import java.net.MalformedURLException;
47
import java.net.UnknownServiceException;
48
import java.net.URL;
49
import java.net.URLConnection;
50
import java.util.Collection;
51
import java.util.Iterator;
52
import java.util.LinkedList;
53
import java.util.List;
54
import java.util.Properties;
55
import java.util.StringTokenizer;
56
import javax.xml.namespace.QName;
57
import javax.xml.transform.ErrorListener;
58
import javax.xml.transform.OutputKeys;
59
import javax.xml.transform.Result;
60
import javax.xml.transform.Source;
61
import javax.xml.transform.Transformer;
62
import javax.xml.transform.TransformerConfigurationException;
63
import javax.xml.transform.TransformerException;
64
import javax.xml.transform.URIResolver;
65
import javax.xml.transform.dom.DOMSource;
66
import javax.xml.transform.dom.DOMResult;
67
import javax.xml.transform.sax.SAXResult;
68
import javax.xml.transform.stream.StreamResult;
69
import org.w3c.dom.Document;
70
import org.w3c.dom.DocumentType;
71
import org.w3c.dom.DOMImplementation;
72
import org.w3c.dom.Node;
73
import org.w3c.dom.Text;
74
import org.xml.sax.ContentHandler;
75
import org.xml.sax.SAXException;
76
import org.xml.sax.ext.LexicalHandler;
77
import gnu.xml.dom.DomDoctype;
78
import gnu.xml.dom.DomDocument;
79
import gnu.xml.dom.ls.WriterOutputStream;
80
 
81
/**
82
 * The transformation process for a given stylesheet.
83
 *
84
 * @author <a href='mailto:dog@gnu.org'>Chris Burdess</a>
85
 */
86
class TransformerImpl
87
  extends Transformer
88
{
89
 
90
  final TransformerFactoryImpl factory;
91
  final Stylesheet stylesheet;
92
  URIResolver uriResolver;
93
  ErrorListener errorListener;
94
  Properties outputProperties;
95
 
96
  TransformerImpl(TransformerFactoryImpl factory,
97
                  Stylesheet stylesheet,
98
                  Properties outputProperties)
99
    throws TransformerConfigurationException
100
  {
101
    this.factory = factory;
102
    uriResolver = factory.userResolver;
103
    errorListener = factory.userListener;
104
    this.stylesheet = stylesheet;
105
    this.outputProperties = outputProperties;
106
    if (stylesheet != null)
107
      {
108
        // Set up parameter context for this transformer
109
        stylesheet.bindings.push(Bindings.PARAM);
110
      }
111
  }
112
 
113
  public void transform(Source xmlSource, Result outputTarget)
114
    throws TransformerException
115
  {
116
    // Get the source tree
117
    DOMSource source;
118
    synchronized (factory.resolver)
119
      {
120
        factory.resolver.setUserResolver(uriResolver);
121
        factory.resolver.setUserListener(errorListener);
122
        source = factory.resolver.resolveDOM(xmlSource, null, null);
123
      }
124
    Node context = source.getNode();
125
    Document doc = (context instanceof Document) ? (Document) context :
126
      context.getOwnerDocument();
127
    if (doc instanceof DomDocument)
128
      {
129
        // Suppress mutation events
130
        ((DomDocument) doc).setBuilding(true);
131
        // TODO find a better/more generic way of doing this than
132
        // casting
133
      }
134
    // Get the result tree
135
    Node parent = null, nextSibling = null;
136
    if (outputTarget instanceof DOMResult)
137
      {
138
        DOMResult dr = (DOMResult) outputTarget;
139
        parent = dr.getNode();
140
        nextSibling = dr.getNextSibling();
141
 
142
        Document rdoc = (parent instanceof Document) ? (Document) parent :
143
          parent.getOwnerDocument();
144
        if (rdoc instanceof DomDocument)
145
          {
146
            // Suppress mutation events and allow multiple root elements
147
            DomDocument drdoc = (DomDocument) rdoc;
148
            drdoc.setBuilding(true);
149
            drdoc.setCheckWellformedness(false);
150
            // TODO find a better/more generic way of doing this than
151
            // casting
152
          }
153
      }
154
    boolean created = false;
155
    // Transformation
156
    if (stylesheet != null)
157
      {
158
        if (parent == null)
159
          {
160
            // Create a new document to hold the result
161
            DomDocument resultDoc = new DomDocument();
162
            resultDoc.setBuilding(true);
163
            resultDoc.setCheckWellformedness(false);
164
            parent = resultDoc;
165
            created = true;
166
          }
167
        // Make a copy of the source node, and strip it
168
        context = context.cloneNode(true);
169
        strip(context);
170
        // XSLT transformation
171
        try
172
          {
173
            // Set output properties in the underlying stylesheet
174
            ((TransformerOutputProperties) outputProperties).apply();
175
            stylesheet.initTopLevelVariables(context);
176
            TemplateNode t = stylesheet.getTemplate(null, context, false);
177
            if (t != null)
178
              {
179
                stylesheet.current = context;
180
                t.apply(stylesheet, null, context, 1, 1, parent, nextSibling);
181
              }
182
          }
183
        catch (TransformerException e)
184
          {
185
            // Done transforming, reset document
186
            if (doc instanceof DomDocument)
187
              {
188
                ((DomDocument) doc).setBuilding(false);
189
              }
190
            throw e;
191
          }
192
      }
193
    else
194
      {
195
        // Identity transform
196
        Node clone = context.cloneNode(true);
197
        if (context.getNodeType() != Node.DOCUMENT_NODE)
198
          {
199
            Document resultDoc;
200
            if (parent == null)
201
              {
202
                // Create a new document to hold the result
203
                DomDocument rd = new DomDocument();
204
                rd.setBuilding(true);
205
                rd.setCheckWellformedness(false);
206
                parent = resultDoc = rd;
207
                created = true;
208
              }
209
            else
210
              {
211
                resultDoc = (parent instanceof Document) ?
212
                  (Document) parent :
213
                  parent.getOwnerDocument();
214
              }
215
            Document sourceDoc = context.getOwnerDocument();
216
            if (sourceDoc != resultDoc)
217
              {
218
                clone = resultDoc.adoptNode(clone);
219
              }
220
            if (nextSibling != null)
221
              {
222
                parent.insertBefore(clone, nextSibling);
223
              }
224
            else
225
              {
226
                parent.appendChild(clone);
227
              }
228
          }
229
        else
230
          {
231
            // Cannot append document to another tree
232
            parent = clone;
233
            created = true;
234
          }
235
      }
236
    String method = outputProperties.getProperty(OutputKeys.METHOD);
237
    int outputMethod = "html".equals(method) ? Stylesheet.OUTPUT_HTML :
238
      "text".equals(method) ? Stylesheet.OUTPUT_TEXT :
239
      Stylesheet.OUTPUT_XML;
240
    String encoding = outputProperties.getProperty(OutputKeys.ENCODING);
241
    String publicId = outputProperties.getProperty(OutputKeys.DOCTYPE_PUBLIC);
242
    String systemId = outputProperties.getProperty(OutputKeys.DOCTYPE_SYSTEM);
243
    String version = outputProperties.getProperty(OutputKeys.VERSION);
244
    boolean omitXmlDeclaration =
245
      "yes".equals(outputProperties.getProperty(OutputKeys.OMIT_XML_DECLARATION));
246
    boolean standalone =
247
      "yes".equals(outputProperties.getProperty(OutputKeys.STANDALONE));
248
    String mediaType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
249
    String cdataSectionElements =
250
      outputProperties.getProperty(OutputKeys.CDATA_SECTION_ELEMENTS);
251
    boolean indent =
252
      "yes".equals(outputProperties.getProperty(OutputKeys.INDENT));
253
    if (created)
254
      {
255
        // Discover document element
256
        DomDocument resultDoc = (DomDocument) parent;
257
        Node root = resultDoc.getDocumentElement();
258
        // Add doctype if specified
259
        if ((publicId != null || systemId != null) &&
260
            root != null)
261
          {
262
            // We must know the name of the root element to
263
            // create the document type
264
            resultDoc.appendChild(new DomDoctype(resultDoc,
265
                                                 root.getNodeName(),
266
                                                 publicId,
267
                                                 systemId));
268
          }
269
        resultDoc.setBuilding(false);
270
        resultDoc.setCheckWellformedness(true);
271
      }
272
    else if (publicId != null || systemId != null)
273
      {
274
        switch (parent.getNodeType())
275
          {
276
          case Node.DOCUMENT_NODE:
277
          case Node.DOCUMENT_FRAGMENT_NODE:
278
            Document resultDoc = (parent instanceof Document) ?
279
              (Document) parent :
280
              parent.getOwnerDocument();
281
            DOMImplementation impl = resultDoc.getImplementation();
282
            DocumentType doctype =
283
              impl.createDocumentType(resultDoc.getNodeName(),
284
                                      publicId,
285
                                      systemId);
286
            // Try to insert doctype before first element
287
            Node ctx = parent.getFirstChild();
288
            for (; ctx != null &&
289
                 ctx.getNodeType() != Node.ELEMENT_NODE;
290
                 ctx = ctx.getNextSibling())
291
              {
292
              }
293
            if (ctx != null)
294
              {
295
                parent.insertBefore(doctype, ctx);
296
              }
297
            else
298
              {
299
                parent.appendChild(doctype);
300
              }
301
          }
302
      }
303
    if (version != null)
304
      {
305
        parent.setUserData("version", version, stylesheet);
306
      }
307
    if (omitXmlDeclaration)
308
      {
309
        parent.setUserData("omit-xml-declaration", "yes", stylesheet);
310
      }
311
    if (standalone)
312
      {
313
        parent.setUserData("standalone", "yes", stylesheet);
314
      }
315
    if (mediaType != null)
316
      {
317
        parent.setUserData("media-type", mediaType, stylesheet);
318
      }
319
    if (cdataSectionElements != null)
320
      {
321
        List list = new LinkedList();
322
        StringTokenizer st = new StringTokenizer(cdataSectionElements);
323
        while (st.hasMoreTokens())
324
          {
325
            String name = st.nextToken();
326
            String localName = name;
327
            String uri = null;
328
            String prefix = null;
329
            int ci = name.indexOf(':');
330
            if (ci != -1)
331
              {
332
                // Use namespaces defined on xsl:output node to resolve
333
                // namespaces for QName
334
                prefix = name.substring(0, ci);
335
                localName = name.substring(ci + 1);
336
                uri = stylesheet.output.lookupNamespaceURI(prefix);
337
              }
338
            list.add(new QName(uri, localName, prefix));
339
          }
340
        if (!list.isEmpty())
341
          {
342
            Document resultDoc = (parent instanceof Document) ?
343
              (Document) parent :
344
              parent.getOwnerDocument();
345
            convertCdataSectionElements(resultDoc, parent, list);
346
          }
347
      }
348
    if (indent)
349
      {
350
        parent.normalize();
351
        strip(parent);
352
        Document resultDoc = (parent instanceof Document) ?
353
          (Document) parent :
354
          parent.getOwnerDocument();
355
        reindent(resultDoc, parent, 0);
356
      }
357
    // Render result to the target device
358
    if (outputTarget instanceof DOMResult)
359
      {
360
        if (created)
361
          {
362
            DOMResult dr = (DOMResult) outputTarget;
363
            dr.setNode(parent);
364
            dr.setNextSibling(null);
365
          }
366
      }
367
    else if (outputTarget instanceof StreamResult)
368
      {
369
        StreamResult sr = (StreamResult) outputTarget;
370
        IOException ex = null;
371
        try
372
          {
373
            writeStreamResult(parent, sr, outputMethod, encoding);
374
          }
375
        catch (UnsupportedEncodingException e)
376
          {
377
            try
378
              {
379
                writeStreamResult(parent, sr, outputMethod, "UTF-8");
380
              }
381
            catch (IOException e2)
382
              {
383
                ex = e2;
384
              }
385
          }
386
        catch (IOException e)
387
          {
388
            ex = e;
389
          }
390
        if (ex != null)
391
          {
392
            if (errorListener != null)
393
              {
394
                errorListener.error(new TransformerException(ex));
395
              }
396
            else
397
              {
398
                ex.printStackTrace(System.err);
399
              }
400
          }
401
      }
402
    else if (outputTarget instanceof SAXResult)
403
      {
404
        SAXResult sr = (SAXResult) outputTarget;
405
        try
406
          {
407
            ContentHandler ch = sr.getHandler();
408
            LexicalHandler lh = sr.getLexicalHandler();
409
            if (lh == null && ch instanceof LexicalHandler)
410
              {
411
                lh = (LexicalHandler) ch;
412
              }
413
            SAXSerializer serializer = new SAXSerializer();
414
            serializer.serialize(parent, ch, lh);
415
          }
416
        catch (SAXException e)
417
          {
418
            if (errorListener != null)
419
              {
420
                errorListener.error(new TransformerException(e));
421
              }
422
            else
423
              {
424
                e.printStackTrace(System.err);
425
              }
426
          }
427
      }
428
  }
429
 
430
  /**
431
   * Strip whitespace from the source tree.
432
   */
433
  void strip(Node node)
434
    throws TransformerConfigurationException
435
  {
436
    short nt = node.getNodeType();
437
    if (nt == Node.ENTITY_REFERENCE_NODE)
438
      {
439
        // Replace entity reference with its content
440
        Node parent = node.getParentNode();
441
        Node child = node.getFirstChild();
442
        if (child != null)
443
          {
444
            strip(child);
445
          }
446
        while (child != null)
447
          {
448
            Node next = child.getNextSibling();
449
            node.removeChild(child);
450
            parent.insertBefore(child, node);
451
            child = next;
452
          }
453
        parent.removeChild(node);
454
      }
455
    if (nt == Node.TEXT_NODE || nt == Node.CDATA_SECTION_NODE)
456
      {
457
        if (!stylesheet.isPreserved((Text) node))
458
          {
459
            node.getParentNode().removeChild(node);
460
          }
461
        else
462
          {
463
            String text = node.getNodeValue();
464
            String stripped = text.trim();
465
            if (!text.equals(stripped))
466
              {
467
                node.setNodeValue(stripped);
468
              }
469
          }
470
      }
471
    else
472
      {
473
        for (Node child = node.getFirstChild(); child != null;
474
             child = child.getNextSibling())
475
          {
476
            strip(child);
477
          }
478
      }
479
  }
480
 
481
  /**
482
   * Obtain a suitable output stream for writing the result to,
483
   * and use the StreamSerializer to write the result tree to the stream.
484
   */
485
  void writeStreamResult(Node node, StreamResult sr, int outputMethod,
486
                         String encoding)
487
    throws IOException
488
  {
489
    OutputStream out = null;
490
    boolean created = false;
491
    try
492
      {
493
        out = sr.getOutputStream();
494
        if (out == null)
495
          {
496
            Writer writer = sr.getWriter();
497
            if (writer != null)
498
              {
499
                out = new WriterOutputStream(writer);
500
              }
501
          }
502
        if (out == null)
503
          {
504
            String systemId = sr.getSystemId();
505
            try
506
              {
507
                URL url = new URL(systemId);
508
                URLConnection connection = url.openConnection();
509
                // We need to call setDoInput(false), because our
510
                // implementation of the file protocol allows writing
511
                // (unlike Sun), but it will fail with a FileNotFoundException
512
                // if we also open the connection for input and the output
513
                // file doesn't yet exist.
514
                connection.setDoInput(false);
515
                connection.setDoOutput(true);
516
                out = connection.getOutputStream();
517
              }
518
            catch (MalformedURLException e)
519
              {
520
                out = new FileOutputStream(systemId);
521
              }
522
            catch (UnknownServiceException e)
523
              {
524
                URL url = new URL(systemId);
525
                out = new FileOutputStream(url.getPath());
526
              }
527
            created = true;
528
          }
529
        out = new BufferedOutputStream(out);
530
        StreamSerializer serializer =
531
          new StreamSerializer(outputMethod, encoding, null);
532
        if (stylesheet != null)
533
          {
534
            Collection celem = stylesheet.outputCdataSectionElements;
535
            serializer.setCdataSectionElements(celem);
536
          }
537
        serializer.serialize(node, out);
538
        out.flush();
539
      }
540
    finally
541
      {
542
        try
543
          {
544
            if (out != null && created)
545
              {
546
                out.close();
547
              }
548
          }
549
        catch (IOException e)
550
          {
551
          }
552
      }
553
  }
554
 
555
  void copyChildren(Document dstDoc, Node src, Node dst)
556
  {
557
    Node srcChild = src.getFirstChild();
558
    while (srcChild != null)
559
      {
560
        Node dstChild = dstDoc.adoptNode(srcChild);
561
        dst.appendChild(dstChild);
562
        srcChild = srcChild.getNextSibling();
563
      }
564
  }
565
 
566
  public void setParameter(String name, Object value)
567
  {
568
    if (stylesheet != null)
569
      {
570
        stylesheet.bindings.set(new QName(null, name), value, Bindings.PARAM);
571
      }
572
  }
573
 
574
  public Object getParameter(String name)
575
  {
576
    if (stylesheet != null)
577
      {
578
        return stylesheet.bindings.get(new QName(null, name), null, 1, 1);
579
      }
580
    return null;
581
  }
582
 
583
  public void clearParameters()
584
  {
585
    if (stylesheet != null)
586
      {
587
        stylesheet.bindings.pop(Bindings.PARAM);
588
        stylesheet.bindings.push(Bindings.PARAM);
589
      }
590
  }
591
 
592
  public void setURIResolver(URIResolver resolver)
593
  {
594
    uriResolver = resolver;
595
  }
596
 
597
  public URIResolver getURIResolver()
598
  {
599
    return uriResolver;
600
  }
601
 
602
  public void setOutputProperties(Properties oformat)
603
    throws IllegalArgumentException
604
  {
605
    if (oformat == null)
606
      {
607
        outputProperties.clear();
608
      }
609
    else
610
      {
611
        outputProperties.putAll(oformat);
612
      }
613
  }
614
 
615
  public Properties getOutputProperties()
616
  {
617
    return (Properties) outputProperties.clone();
618
  }
619
 
620
  public void setOutputProperty(String name, String value)
621
    throws IllegalArgumentException
622
  {
623
    outputProperties.put(name, value);
624
  }
625
 
626
  public String getOutputProperty(String name)
627
    throws IllegalArgumentException
628
  {
629
    return outputProperties.getProperty(name);
630
  }
631
 
632
  public void setErrorListener(ErrorListener listener)
633
  {
634
    errorListener = listener;
635
  }
636
 
637
  public ErrorListener getErrorListener()
638
  {
639
    return errorListener;
640
  }
641
 
642
  static final String INDENT_WHITESPACE = "  ";
643
 
644
  /*
645
   * Apply indent formatting to the given tree.
646
   */
647
  void reindent(Document doc, Node node, int offset)
648
  {
649
    if (node.hasChildNodes())
650
      {
651
        boolean markupContent = false;
652
        boolean textContent = false;
653
        List children = new LinkedList();
654
        Node ctx = node.getFirstChild();
655
        while (ctx != null)
656
          {
657
            switch (ctx.getNodeType())
658
              {
659
              case Node.ELEMENT_NODE:
660
              case Node.PROCESSING_INSTRUCTION_NODE:
661
              case Node.DOCUMENT_TYPE_NODE:
662
                markupContent = true;
663
                break;
664
              case Node.TEXT_NODE:
665
              case Node.CDATA_SECTION_NODE:
666
              case Node.ENTITY_REFERENCE_NODE:
667
              case Node.COMMENT_NODE:
668
                textContent = true;
669
                break;
670
              }
671
            children.add(ctx);
672
            ctx = ctx.getNextSibling();
673
          }
674
        if (markupContent)
675
          {
676
            if (textContent)
677
              {
678
                // XXX handle mixed content differently?
679
              }
680
            int nodeType = node.getNodeType();
681
            if (nodeType == Node.DOCUMENT_NODE)
682
              {
683
                for (Iterator i = children.iterator(); i.hasNext(); )
684
                  {
685
                    ctx = (Node) i.next();
686
                    reindent(doc, ctx, offset + 1);
687
                  }
688
              }
689
            else
690
              {
691
                StringBuffer buf = new StringBuffer();
692
                buf.append('\n');
693
                for (int i = 0; i < offset + 1; i++)
694
                  {
695
                    buf.append(INDENT_WHITESPACE);
696
                  }
697
                String ws = buf.toString();
698
                for (Iterator i = children.iterator(); i.hasNext(); )
699
                  {
700
                    ctx = (Node) i.next();
701
                    node.insertBefore(doc.createTextNode(ws), ctx);
702
                    reindent(doc, ctx, offset + 1);
703
                  }
704
                buf = new StringBuffer();
705
                buf.append('\n');
706
                ws = buf.toString();
707
                for (int i = 0; i < offset; i++)
708
                  {
709
                    buf.append(INDENT_WHITESPACE);
710
                  }
711
                node.appendChild(doc.createTextNode(ws));
712
              }
713
          }
714
      }
715
  }
716
 
717
  /**
718
   * Converts the text node children of any cdata-section-elements in the
719
   * tree to CDATA section nodes.
720
   */
721
  void convertCdataSectionElements(Document doc, Node node, List list)
722
  {
723
    if (node.getNodeType() == Node.ELEMENT_NODE)
724
      {
725
        boolean match = false;
726
        for (Iterator i = list.iterator(); i.hasNext(); )
727
          {
728
            QName qname = (QName) i.next();
729
            if (match(qname, node))
730
              {
731
                match = true;
732
                break;
733
              }
734
          }
735
        if (match)
736
          {
737
            Node ctx = node.getFirstChild();
738
            while (ctx != null)
739
              {
740
                if (ctx.getNodeType() == Node.TEXT_NODE)
741
                  {
742
                    Node cdata = doc.createCDATASection(ctx.getNodeValue());
743
                    node.replaceChild(cdata, ctx);
744
                    ctx = cdata;
745
                  }
746
                ctx = ctx.getNextSibling();
747
              }
748
          }
749
      }
750
    Node ctx = node.getFirstChild();
751
    while (ctx != null)
752
      {
753
        if (ctx.hasChildNodes())
754
          {
755
            convertCdataSectionElements(doc, ctx, list);
756
          }
757
        ctx = ctx.getNextSibling();
758
      }
759
  }
760
 
761
  boolean match(QName qname, Node node)
762
  {
763
    String ln1 = qname.getLocalPart();
764
    String ln2 = node.getLocalName();
765
    if (ln2 == null)
766
      {
767
        return ln1.equals(node.getNodeName());
768
      }
769
    else
770
      {
771
        String uri1 = qname.getNamespaceURI();
772
        String uri2 = node.getNamespaceURI();
773
        return (uri1.equals(uri2) && ln1.equals(ln2));
774
      }
775
  }
776
 
777
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.