Click here to Skip to main content
16,004,969 members
Home / Discussions / XML / XSL
   

XML / XSL

 
Questionreading xml schema file and generate xml Pin
D.Sridhar25-Jul-07 8:45
D.Sridhar25-Jul-07 8:45 
QuestionAccess table to XML [modified] Pin
kallileo23-Jul-07 21:19
kallileo23-Jul-07 21:19 
QuestionCreating an XmlNode / XPathNavigator object From Schema. Pin
Tristan Rhodes22-Jul-07 23:25
Tristan Rhodes22-Jul-07 23:25 
QuestionCreate xml file Pin
Maynka19-Jul-07 20:57
Maynka19-Jul-07 20:57 
AnswerRe: Create xml file Pin
sathesh pandian19-Jul-07 21:00
sathesh pandian19-Jul-07 21:00 
AnswerRe: Create xml file Pin
Naji El Kotob20-Jul-07 10:46
Naji El Kotob20-Jul-07 10:46 
QuestionRemove elements from XML. using XSLT and JAXP [modified] Pin
Manish Paul18-Jul-07 0:02
Manish Paul18-Jul-07 0:02 
AnswerRe: Remove elements from XML. using XSLT and JAXP Pin
Manish Paul18-Jul-07 3:32
Manish Paul18-Jul-07 3:32 
Well strangely I am reply to my posted query ..

In the given example, it is expected that template in the XSLT, <xsl:template match="outstation"> </xsl:template>, should remove all occurrence of "outstation" elements from the XML document.

This XSLT will work fine for any XML document which doesn't has a "DEFAULT NAMESPACE" declared in root element. In given example, I have declared a default namespace in root element as 'xmlns="http://www.contacts.com/transform"'. Because of the default namespace, the expanded name of element is pair of URI name and Element name (URI name here is "http://www.contacts.com/transform"). So the template defined in XSLT for "outstation" element will fail to match any <outstation> element in XML file.

As the namespaces link the XML & XSLT through a URI. So the solution to this problem is to add a namespace prefix with the namespace name "http://www.contacts.com/transform" in the xslt file and then use the prefix in the XPath statements as shown below:

Solution is in XSLT:
<?xml version = '1.0' encoding = 'UTF-8'?>
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:txf="http://www.contacts.com/transform">
...
...
...
<xsl:template match="txf:outstation">
</xsl:template>
</xsl:transform>

QuestionHTML to XML Pin
turoi14-Jul-07 18:18
turoi14-Jul-07 18:18 
AnswerRe: HTML to XML Pin
George L. Jackson16-Jul-07 16:17
George L. Jackson16-Jul-07 16:17 
QuestionXpath expression Pin
Ibana14-Jul-07 7:04
Ibana14-Jul-07 7:04 
AnswerRe: Xpath expression Pin
George L. Jackson14-Jul-07 9:29
George L. Jackson14-Jul-07 9:29 
GeneralRe: Xpath expression Pin
Ibana2-Aug-07 4:28
Ibana2-Aug-07 4:28 
GeneralRe: Xpath expression Pin
Ibana2-Aug-07 4:51
Ibana2-Aug-07 4:51 
QuestionRe: Xpath expression Pin
George L. Jackson2-Aug-07 12:03
George L. Jackson2-Aug-07 12:03 
AnswerRe: Xpath expression Pin
Ibana3-Aug-07 6:58
Ibana3-Aug-07 6:58 
AnswerRe: Xpath expression Pin
George L. Jackson3-Aug-07 9:39
George L. Jackson3-Aug-07 9:39 
GeneralRe: Xpath expression Pin
Ibana7-Aug-07 6:36
Ibana7-Aug-07 6:36 
QuestionUnknown entity class: NHibernate.Examples.QuickStart.User Pin
itbrainsoft12-Jul-07 19:12
itbrainsoft12-Jul-07 19:12 
QuestionHow to build source with XML componet in DDK source? Pin
wanylee11-Jul-07 15:51
wanylee11-Jul-07 15:51 
AnswerRe: How to build source with XML componet in DDK source? Pin
George L. Jackson14-Jul-07 9:48
George L. Jackson14-Jul-07 9:48 
QuestionDate comparison in XML Pin
Muhammad Junaid Khan11-Jul-07 1:50
Muhammad Junaid Khan11-Jul-07 1:50 
QuestionXslt (table row shrinks in resultant html) [modified] Pin
Madhanlal JM10-Jul-07 23:46
Madhanlal JM10-Jul-07 23:46 
AnswerRe: Xslt (table row shrinks in resultant html) Pin
George L. Jackson14-Jul-07 10:10
George L. Jackson14-Jul-07 10:10 
GeneralRe: Xslt (table row shrinks in resultant html) Pin
Madhanlal JM15-Jul-07 23:28
Madhanlal JM15-Jul-07 23:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.