Restore method required for XPath transform.

git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-cpp/trunk@1817130 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/xml-security-c.spec b/xml-security-c.spec
index 853e1a2..18c2ea8 100644
--- a/xml-security-c.spec
+++ b/xml-security-c.spec
@@ -10,10 +10,10 @@
 
 %if 0%{?rhel} >= 7 || 0%{?centos_version} >= 700
 BuildRequires:  xerces-c-devel >= 3.2
-%{?_with_xalan:BuildRequires: xalan-c-devel >= 1.12}
+%{?_with_xalan:BuildRequires: xalan-c-devel >= 1.11}
 %else
 BuildRequires:  libxerces-c-devel >= 3.2
-%{?_with_xalan:BuildRequires: libxalan-c-devel >= 1.12}
+%{?_with_xalan:BuildRequires: libxalan-c-devel >= 1.11}
 %endif
 BuildRequires:  openssl-devel gcc-c++ pkgconfig
 %if "%{_vendor}" == "redhat"
diff --git a/xsec/transformers/TXFMBase.cpp b/xsec/transformers/TXFMBase.cpp
index e04241e..d176fe5 100644
--- a/xsec/transformers/TXFMBase.cpp
+++ b/xsec/transformers/TXFMBase.cpp
@@ -123,3 +123,9 @@
     return NULL;		// Return a null node
 
 }
+
+const XMLCh* TXFMBase::getFragmentId() const {
+
+    return NULL;
+
+}
diff --git a/xsec/transformers/TXFMBase.hpp b/xsec/transformers/TXFMBase.hpp
index bee2200..07212bd 100644
--- a/xsec/transformers/TXFMBase.hpp
+++ b/xsec/transformers/TXFMBase.hpp
@@ -131,6 +131,7 @@
 	virtual unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill) = 0;
 	virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *getDocument() const;
 	virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *getFragmentNode() const;
+	virtual const XMLCh* getFragmentId() const;
 	virtual XSECXPathNodeList & getXPathNodeList() {return m_XPathMap;}
 
 	// Friends and Statics
diff --git a/xsec/transformers/TXFMDocObject.cpp b/xsec/transformers/TXFMDocObject.cpp
index 14a0c5c..d3664d1 100644
--- a/xsec/transformers/TXFMDocObject.cpp
+++ b/xsec/transformers/TXFMDocObject.cpp
@@ -34,16 +34,16 @@
 
 // Construct/Destruct
 
-TXFMDocObject::TXFMDocObject(DOMDocument *doc) : TXFMBase(doc) {
-
-	input = NULL;
-	type = TXFMBase::DOM_NODE_NONE;	// No nodes currently held
-	mp_env = NULL;
+TXFMDocObject::TXFMDocObject(DOMDocument *doc)
+	: TXFMBase(doc), fragmentId(NULL), document(NULL), fragmentObject(NULL), type(TXFMBase::DOM_NODE_NONE), mp_env(NULL) {
 
 }
 
 TXFMDocObject::~TXFMDocObject() {
 
+	if (fragmentId != NULL)
+		XSEC_RELEASE_XMLCH(fragmentId);
+
 }
 
 // Methods to set the inputs
@@ -132,6 +132,7 @@
 		throw XSECException(XSECException::IDNotFoundInDOMDoc);
 
 	document = doc;
+	fragmentId = XMLString::replicate(newFragmentId);
 	type = TXFMBase::DOM_NODE_DOCUMENT_FRAGMENT;
 
 }
@@ -202,3 +203,9 @@
 	return fragmentObject;
 
 }
+
+const XMLCh * TXFMDocObject::getFragmentId() const {
+
+	return fragmentId;
+
+}
diff --git a/xsec/transformers/TXFMDocObject.hpp b/xsec/transformers/TXFMDocObject.hpp
index 499c5d0..b881058 100644
--- a/xsec/transformers/TXFMDocObject.hpp
+++ b/xsec/transformers/TXFMDocObject.hpp
@@ -50,7 +50,7 @@
 public:
 
 	TXFMDocObject(XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc);
-	~TXFMDocObject();
+	virtual ~TXFMDocObject();
 
 	// Methods to set the inputs
 
@@ -81,9 +81,11 @@
 	unsigned int readBytes(XMLByte * const toFill, const unsigned int maxToFill);
 	virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument * getDocument() const;
 	virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMNode * getFragmentNode() const;
+	virtual const XMLCh* getFragmentId() const;
 	
 private:
 
+	XMLCh	* fragmentId;				// The identifier of the object
 	XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument 
 			* document;					// The DOM document we are working with
 	XERCES_CPP_NAMESPACE_QUALIFIER DOMNode