Commits

ma...@9ae0c189-cd1f-4510-a509-f4891f5cf20d  committed 38f8587

Moved POD files around, played with Makefile.PL, etc.

  • Participants
  • Parent commits 7f5ccab

Comments (0)

Files changed (15)

 Revision history for Perl extension XML::LibXSLT.
 
+0.91
+    - Removed from XML::LibXSLT distribution
+    - Added DOM API (phish)
+
 0.01  Sat Mar  3 17:08:00 2001
 	- original version; created by h2xs 1.19
 
 
 =head1 DESCRIPTION
 
-Currently this module doesn't actually do much but parse files and give
-you back a document (DOM) handle. You can't actually call DOM methods on
-that document though (because I haven't written the code to do it yet!).
+This module is an interface to the gnome libxml2 DOM parser (no SAX
+parser support yet), and the DOM tree. It also provides an
+XML::XPath-like findnodes() interface, providing access to the XPath
+API in libxml2.
 
 =head1 OPTIONS
 
 
 =head1 SEE ALSO
 
-XML::LibXSLT
+L<XML::LibXSLT>, L<XML::LibXML::Document>,
+L<XML::LibXML::Element>, L<XML::LibXML::Node>,
+L<XML::LibXML::Text>, L<XML::LibXML::Comment>,
+L<XML::LibXML::CDATASection>
 
 =cut
 example/bad.xml
 example/libxml.xml
 example/xml2pod.pl
-pod/XML::LibXML::Document.pod
-pod/XML::LibXML::Comment.pod
-pod/XML::LibXML::Text.pod
-pod/XML::LibXML::CDATASection.pod
-pod/XML::LibXML::Element.pod
-pod/XML::LibXML::Node.pod
+pod/XML/LibXML/Document.pod
+pod/XML/LibXML/Comment.pod
+pod/XML/LibXML/Text.pod
+pod/XML/LibXML/CDATASection.pod
+pod/XML/LibXML/Element.pod
+pod/XML/LibXML/Node.pod
 t/01basic.t
 t/02parsestring.t
 t/03parsefile.t

File lib/XML/LibXML/CDATASection.pod

+=head1 NAME
+
+XML::LibXML::CDATASection - The DOM CDATASection Class
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::CDATASection;
+
+  $node = XML::LibXML::Comment( $content );
+
+=head1 DESCRIPTION
+
+This class provides all functions of B<XML::LibXML::Text>,
+but for CDATA nodes.
+
+=head2 Methods
+
+=over 4
+
+=item B<new>
+
+The constructor is the only provided function for this
+package. It is required, because B<libxml2> treats the
+different textnode types slightly different.
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Document
+
+=head1 VERSION
+
+0.90_a
+

File lib/XML/LibXML/Comment.pod

+=head1 NAME
+
+XML::LibXML::Comment - The DOM Comment Class
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::Comment;
+
+  $node = XML::LibXML::Comment( $content );
+
+=head1 DESCRIPTION
+
+This class provides all functions of B<XML::LibXML::Text>,
+but for comment nodes. This can be done, since only the output
+of the nodetypes is different, but not the datastructure. :-)
+
+=head2 Methods
+
+=over 4
+
+=item B<new>
+
+The constructor is the only provided function for this
+package. It is required, because B<libxml2> treats text
+nodes and comment nodes slightly different.
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Document
+
+=head1 VERSION
+
+0.90_a
+

File lib/XML/LibXML/Document.pod

+=head1 NAME
+
+XML::LibXML::Document - DOM Document Class
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::Document;
+
+  $dom = XML::LibXML::Document->new( $version, $encoding )
+  $dom = XML::LibXML::Document->createDocument( $version, $encoding );
+  $docstring = $dom->toString();
+  $bool = $dom->is_valid();
+  $root = $dom->getDocumentElement($name, $namespace );
+  $dom->setDocumentElement( $root );
+  $element = $dom->createElement( $nodename );
+  $text = $dom->createTextNode( $content_text );
+  $comment = $dom->createComment( $comment_text );
+  $cdata = $dom->create( $cdata_content );
+
+=head1 DESCRIPTION
+
+The Document Class is the result of a parsing process. But
+sometimes it is needed, to create a Document from scratch. The
+provides functions that are conform to the DOM Core naming
+style.
+
+=head2 Methods
+
+=over 4
+
+=item B<new>
+
+alias for createDocument()
+
+=item B<createDocument>
+
+The constructor for the document class. As Parameter it takes
+the version string and (optionally) the ecoding string.
+Simply calling B<createDocument> will create the document:
+
+  
+  <?xml version="your version" encoding="your encoding"?>
+
+
+=item B<toString>
+
+B<toString> is a deparsing function, so the DOM Tree can
+be translated into a string, ready for output.
+
+=item B<is_valid>
+
+Returns either TRUE or FALSE depending on the DOM Tree is a
+valid Document or not.
+
+=item B<getDocumentElement>
+
+Returns the root element of the Document. A document can have
+just one root element to contain the documents data.
+
+=item B<setDocumentElement>
+
+This function enables you to set the root element for a
+document. The function supports the import of a node from a
+different document tree.
+
+=item B<createElement>
+
+This function creates a new Element Node bound to the DOM with
+the name I<$nodename> .
+
+=item B<createTextNode>
+
+As an equivalent of B<createElement> , but it creates a B<Text Node> bound to the DOM.
+
+=item B<createComment>
+
+As an equivalent of B<createElement> , but it creates a B<Comment Node> bound to the DOM.
+
+=item B<createCDATASection>
+
+Similar to createTextNode and createComment, this function creates a CDataSection bound to the current DOM.
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Comment
+
+=head1 VERSION
+
+0.90_a
+

File lib/XML/LibXML/Element.pod

+=head1 NAME
+
+XML::LibXML::Element - The DOM Element Class
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::Element;
+
+  $node = XML::LibXML::Element->new( $name )
+  $node->setAttribute( $aname, $avalue );
+  $avalue = $node->getAttribute( $aname );
+  $node->removeAttribute( $aname );
+  @nodes = $node->getElementsByTagName($tagname);
+  $node->appendWellBalancedChunk( $chunk )
+  $node->appendTextNode( $PCDATA )
+
+=head1 DESCRIPTION
+
+
+
+=head2 Methods
+
+=over 4
+
+=item B<new>
+
+This function creates a new node unbound to any DOM.
+
+=item B<setAttribute>
+
+This method sets or replaces the node's attribute I<$aname> to the value I<$avalue>
+
+=item B<getAttribute>
+
+If I<$node> has an attribute with the name I<$aname> ,
+the value of this attribute will get returned.
+
+=item B<removeAttribute>
+
+The method removes the attribute I<$aname> from the node's
+attribute list, if the attribute can be found.
+
+=item B<getElementsByTagName>
+
+The function gives direct access to all childnodes of the current node with the same tagname. It makes things a lot easier if you need to handle big datasets.
+
+=item B<appendWellBalancedChunk>
+
+Sometimes it is nessecary to append a string coded XML Tree to a node. B<appendWellBalancedChunk> will do the trick for you.
+But this is only done if the String is I<well-balanced> .
+
+=item B<appendTextNode>
+
+This wrapper function lets you add a string directly to an element
+node.
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Node, XML::LibXML::Document, XML::LibXML::Text, XML::LibXML::Comment
+
+=head1 VERSION
+
+0.90_a
+

File lib/XML/LibXML/Node.pod

+=head1 NAME
+
+XML::LibXML::Node - "virtual" Base Class DOM-Nodes
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::Node;
+
+  $name = $node->getName();
+  $content = $node->getData()
+  $type = $node->getType();
+  $node->unbindNode()
+  $childnode = $node->removeChild( $childnode )
+  $oldnode = $node->replaceChild( $newNode, $oldNode )
+  $childnode = $node->appendChild( $childnode )
+  $newnode =$node->cloneNode( $deep )
+  $parentnode = $node->getParentNode()
+  $nextnode = $node->getNextSibling()
+  $nextnode = $node->getPreviousSibling()
+  $childnode = $node->getFirstChild()
+  $childnode = $node->getLastChild()
+  $dom = $node->getOwnerDocument()
+  $node->setOwnerDocument( $dom );
+  @nodes = $node->findnodes( $xpath_statement );
+  @children = $node->getChildnodes();
+  $xmlstring = $node->toString();
+
+=head1 DESCRIPTION
+
+LibXML::Node defines functions that are common to all Node
+Types. A LibXML::Node should never be created standalone, but
+as an instance of a high level class such as LibXML::Element
+or LibXML::Text. The class itself should provide only common
+functionality.
+
+=head2 Methods
+
+=over 4
+
+=item B<getName>
+
+Returns the node's name
+
+=item B<getData>
+
+If the node has any content (such as stored in a I<text
+	node> ) it can get requested through this function.
+
+=item B<getType>
+
+Retrun the node's type. The possible types are described in
+the libxml2 B<tree.h> documentation.
+
+=item B<unbindNode>
+
+Unbinds the Node from its siblings and Parent, but not from the
+Document it belongs to. If the node is not inserted into the DOM afterwards it will be lost after the programm terminated.
+
+=item B<removeChild>
+
+This will unbind the Child Node from its parent I<$node> . The function returns the unbound node.
+If I<oldNode> is not a child of the given Node the
+function will fail.
+
+=item B<replaceChild>
+
+Replaces the I<$oldNode> with the I<$newNode> . The I<$oldNode> will be unbound from the Node
+
+=item B<appendChild>
+
+The function will add the I<$childnode> to the end of I<$node> 's children. The function should fail, if the new
+childnode is allready a child of I<$node>
+
+=item B<cloneNode>
+
+B<cloneNode> creates a copy of I<$node> . Wether $deep
+is set to 1 (true) the function will copy all childnodes as
+well. If $deep is 0 only the current node will be copied.
+By now the function is not aware about the CLASS that is
+blessed to the node to copy, therefor all CLASS specific
+functions will not be accesseble any more :-(
+
+=item B<getParentNode>
+
+Returns simply the Parent Node of the current node. If this function is called on the root element, the document
+will be returned as a LibXML::Node element. So be carefull :-)
+
+=item B<getNextSibling>
+
+Returns the next sibling if any .
+
+=item B<getPreviousSibling>
+
+Analogous to B<getNextSibling> the function returns the previous
+sibling if any.
+
+=item B<getFirstChild>
+
+If a node has childnodes this function will return the first
+node in the childlist.
+
+=item B<getLastChild>
+
+If the I<$node> has childnodes this function returns the
+last child node.
+
+=item B<getOwnerDocument>
+
+Through this function it is allway possible to access the
+document the current node is bound to.
+
+=item B<setOwnerDocument>
+
+This function binds a node to another DOM. This method unbinds the node first, if it is allready bound to another document.
+
+=item B<findnodes>
+
+B<findnodes> performs the xpath statement on the current node and returns the result as an array.
+
+=item B<getChildnodes>
+
+B<getChildnodes> implements a more intuitive interface to the childnodes of the current node. It enables you to pass all children directly to a I<map> or I<grep> .
+
+=item B<toString>
+
+This is the equivalent to I<XML::LibXML::Document::toString> for
+a single node. This means a node and all its childnodes will be dumped into the result string. There is no formating implemented yet, which may cause an unreadable output.
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Comment
+
+=head1 VERSION
+
+0.90_a
+

File lib/XML/LibXML/Text.pod

+=head1 NAME
+
+XML::LibXML::Text - The DOM Text Node Class
+
+=head1 SYNOPSIS
+
+  use XML::LibXML::Text;
+
+  $node = XML::LibXML::Text->new( $content ) 
+  $node->setData( $text_content );
+
+=head1 DESCRIPTION
+
+
+
+=head2 Methods
+
+=over 4
+
+=item B<new>
+
+The constuctor of the class. It creates an unbound text node.
+
+=item B<setData>
+
+This function sets or replaces text content to a node. The
+node has to be of the type "text", "cdata" (not supported yet)
+or "comment".
+
+=back
+
+=head1 SEE ALSO
+
+XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Document, XML::LibXML::Comment
+
+=head1 VERSION
+
+0.90_a
+

File pod/XML::LibXML::CDATASection.pod

-=head1 NAME
-
-XML::LibXML::CDATASection - The DOM CDATASection Class
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::CDATASection;
-
-  $node = XML::LibXML::Comment( $content );
-
-=head1 DESCRIPTION
-
-This class provides all functions of B<XML::LibXML::Text>,
-but for CDATA nodes.
-
-=head2 Methods
-
-=over 4
-
-=item B<new>
-
-The constructor is the only provided function for this
-package. It is required, because B<libxml2> treats the
-different textnode types slightly different.
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Document
-
-=head1 VERSION
-
-0.90_a
-

File pod/XML::LibXML::Comment.pod

-=head1 NAME
-
-XML::LibXML::Comment - The DOM Comment Class
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::Comment;
-
-  $node = XML::LibXML::Comment( $content );
-
-=head1 DESCRIPTION
-
-This class provides all functions of B<XML::LibXML::Text>,
-but for comment nodes. This can be done, since only the output
-of the nodetypes is different, but not the datastructure. :-)
-
-=head2 Methods
-
-=over 4
-
-=item B<new>
-
-The constructor is the only provided function for this
-package. It is required, because B<libxml2> treats text
-nodes and comment nodes slightly different.
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Document
-
-=head1 VERSION
-
-0.90_a
-

File pod/XML::LibXML::Document.pod

-=head1 NAME
-
-XML::LibXML::Document - DOM Document Class
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::Document;
-
-  $dom = XML::LibXML::Document->new( $version, $encoding )
-  $dom = XML::LibXML::Document->createDocument( $version, $encoding );
-  $docstring = $dom->toString();
-  $bool = $dom->is_valid();
-  $root = $dom->getDocumentElement($name, $namespace );
-  $dom->setDocumentElement( $root );
-  $element = $dom->createElement( $nodename );
-  $text = $dom->createTextNode( $content_text );
-  $comment = $dom->createComment( $comment_text );
-  $cdata = $dom->create( $cdata_content );
-
-=head1 DESCRIPTION
-
-The Document Class is the result of a parsing process. But
-sometimes it is needed, to create a Document from scratch. The
-provides functions that are conform to the DOM Core naming
-style.
-
-=head2 Methods
-
-=over 4
-
-=item B<new>
-
-alias for createDocument()
-
-=item B<createDocument>
-
-The constructor for the document class. As Parameter it takes
-the version string and (optionally) the ecoding string.
-Simply calling B<createDocument> will create the document:
-
-  
-  <?xml version="your version" encoding="your encoding"?>
-
-
-=item B<toString>
-
-B<toString> is a deparsing function, so the DOM Tree can
-be translated into a string, ready for output.
-
-=item B<is_valid>
-
-Returns either TRUE or FALSE depending on the DOM Tree is a
-valid Document or not.
-
-=item B<getDocumentElement>
-
-Returns the root element of the Document. A document can have
-just one root element to contain the documents data.
-
-=item B<setDocumentElement>
-
-This function enables you to set the root element for a
-document. The function supports the import of a node from a
-different document tree.
-
-=item B<createElement>
-
-This function creates a new Element Node bound to the DOM with
-the name I<$nodename> .
-
-=item B<createTextNode>
-
-As an equivalent of B<createElement> , but it creates a B<Text Node> bound to the DOM.
-
-=item B<createComment>
-
-As an equivalent of B<createElement> , but it creates a B<Comment Node> bound to the DOM.
-
-=item B<createCDATASection>
-
-Similar to createTextNode and createComment, this function creates a CDataSection bound to the current DOM.
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Comment
-
-=head1 VERSION
-
-0.90_a
-

File pod/XML::LibXML::Element.pod

-=head1 NAME
-
-XML::LibXML::Element - The DOM Element Class
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::Element;
-
-  $node = XML::LibXML::Element->new( $name )
-  $node->setAttribute( $aname, $avalue );
-  $avalue = $node->getAttribute( $aname );
-  $node->removeAttribute( $aname );
-  @nodes = $node->getElementsByTagName($tagname);
-  $node->appendWellBalancedChunk( $chunk )
-  $node->appendTextNode( $PCDATA )
-
-=head1 DESCRIPTION
-
-
-
-=head2 Methods
-
-=over 4
-
-=item B<new>
-
-This function creates a new node unbound to any DOM.
-
-=item B<setAttribute>
-
-This method sets or replaces the node's attribute I<$aname> to the value I<$avalue>
-
-=item B<getAttribute>
-
-If I<$node> has an attribute with the name I<$aname> ,
-the value of this attribute will get returned.
-
-=item B<removeAttribute>
-
-The method removes the attribute I<$aname> from the node's
-attribute list, if the attribute can be found.
-
-=item B<getElementsByTagName>
-
-The function gives direct access to all childnodes of the current node with the same tagname. It makes things a lot easier if you need to handle big datasets.
-
-=item B<appendWellBalancedChunk>
-
-Sometimes it is nessecary to append a string coded XML Tree to a node. B<appendWellBalancedChunk> will do the trick for you.
-But this is only done if the String is I<well-balanced> .
-
-=item B<appendTextNode>
-
-This wrapper function lets you add a string directly to an element
-node.
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Node, XML::LibXML::Document, XML::LibXML::Text, XML::LibXML::Comment
-
-=head1 VERSION
-
-0.90_a
-

File pod/XML::LibXML::Node.pod

-=head1 NAME
-
-XML::LibXML::Node - "virtual" Base Class DOM-Nodes
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::Node;
-
-  $name = $node->getName();
-  $content = $node->getData()
-  $type = $node->getType();
-  $node->unbindNode()
-  $childnode = $node->removeChild( $childnode )
-  $oldnode = $node->replaceChild( $newNode, $oldNode )
-  $childnode = $node->appendChild( $childnode )
-  $newnode =$node->cloneNode( $deep )
-  $parentnode = $node->getParentNode()
-  $nextnode = $node->getNextSibling()
-  $nextnode = $node->getPreviousSibling()
-  $childnode = $node->getFirstChild()
-  $childnode = $node->getLastChild()
-  $dom = $node->getOwnerDocument()
-  $node->setOwnerDocument( $dom );
-  @nodes = $node->findnodes( $xpath_statement );
-  @children = $node->getChildnodes();
-  $xmlstring = $node->toString();
-
-=head1 DESCRIPTION
-
-LibXML::Node defines functions that are common to all Node
-Types. A LibXML::Node should never be created standalone, but
-as an instance of a high level class such as LibXML::Element
-or LibXML::Text. The class itself should provide only common
-functionality.
-
-=head2 Methods
-
-=over 4
-
-=item B<getName>
-
-Returns the node's name
-
-=item B<getData>
-
-If the node has any content (such as stored in a I<text
-	node> ) it can get requested through this function.
-
-=item B<getType>
-
-Retrun the node's type. The possible types are described in
-the libxml2 B<tree.h> documentation.
-
-=item B<unbindNode>
-
-Unbinds the Node from its siblings and Parent, but not from the
-Document it belongs to. If the node is not inserted into the DOM afterwards it will be lost after the programm terminated.
-
-=item B<removeChild>
-
-This will unbind the Child Node from its parent I<$node> . The function returns the unbound node.
-If I<oldNode> is not a child of the given Node the
-function will fail.
-
-=item B<replaceChild>
-
-Replaces the I<$oldNode> with the I<$newNode> . The I<$oldNode> will be unbound from the Node
-
-=item B<appendChild>
-
-The function will add the I<$childnode> to the end of I<$node> 's children. The function should fail, if the new
-childnode is allready a child of I<$node>
-
-=item B<cloneNode>
-
-B<cloneNode> creates a copy of I<$node> . Wether $deep
-is set to 1 (true) the function will copy all childnodes as
-well. If $deep is 0 only the current node will be copied.
-By now the function is not aware about the CLASS that is
-blessed to the node to copy, therefor all CLASS specific
-functions will not be accesseble any more :-(
-
-=item B<getParentNode>
-
-Returns simply the Parent Node of the current node. If this function is called on the root element, the document
-will be returned as a LibXML::Node element. So be carefull :-)
-
-=item B<getNextSibling>
-
-Returns the next sibling if any .
-
-=item B<getPreviousSibling>
-
-Analogous to B<getNextSibling> the function returns the previous
-sibling if any.
-
-=item B<getFirstChild>
-
-If a node has childnodes this function will return the first
-node in the childlist.
-
-=item B<getLastChild>
-
-If the I<$node> has childnodes this function returns the
-last child node.
-
-=item B<getOwnerDocument>
-
-Through this function it is allway possible to access the
-document the current node is bound to.
-
-=item B<setOwnerDocument>
-
-This function binds a node to another DOM. This method unbinds the node first, if it is allready bound to another document.
-
-=item B<findnodes>
-
-B<findnodes> performs the xpath statement on the current node and returns the result as an array.
-
-=item B<getChildnodes>
-
-B<getChildnodes> implements a more intuitive interface to the childnodes of the current node. It enables you to pass all children directly to a I<map> or I<grep> .
-
-=item B<toString>
-
-This is the equivalent to I<XML::LibXML::Document::toString> for
-a single node. This means a node and all its childnodes will be dumped into the result string. There is no formating implemented yet, which may cause an unreadable output.
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Element, XML::LibXML::Text, XML::LibXML::Comment
-
-=head1 VERSION
-
-0.90_a
-

File pod/XML::LibXML::Text.pod

-=head1 NAME
-
-XML::LibXML::Text - The DOM Text Node Class
-
-=head1 SYNOPSIS
-
-  use XML::LibXML::Text;
-
-  $node = XML::LibXML::Text->new( $content ) 
-  $node->setData( $text_content );
-
-=head1 DESCRIPTION
-
-
-
-=head2 Methods
-
-=over 4
-
-=item B<new>
-
-The constuctor of the class. It creates an unbound text node.
-
-=item B<setData>
-
-This function sets or replaces text content to a node. The
-node has to be of the type "text", "cdata" (not supported yet)
-or "comment".
-
-=back
-
-=head1 SEE ALSO
-
-XML::LibXML, XML::LibXML::Node, XML::LibXML::Element, XML::LibXML::Document, XML::LibXML::Comment
-
-=head1 VERSION
-
-0.90_a
-