Jump to content


  • Posts

  • Joined

  • Last visited

josephmmorgan@hotmail.com's Achievements


Newbie (1/7)



  1. I have a situation that is well over my head. I need to take a flat layout and transform it into a hierarchical layout. (See attachments) I actually have a prototype XSLT that uses named templates and having one template call the other to create somewhat of the hierarchy. Currently, the structures are repeating. I need to know how not to have them repeat. I also can't get my head around how to find and extract the complete content at the correct place. I would have posted my XSLT, but, I may be headed in completely the wrong direction. What I'd like is to get proper guidance on how to do it. I suspect I'll have to learn about muenchian grouping, but still have no idea how to proceed. I'm also limited to XSLT 1.0. SampleCustomerSalesHierarchical.xml SampleCustomerSalesFlat.xml
  2. I have a peculiar situation where I need to be able to extract the namespace and the name of the first element within the "Body" tag of a soap envelope without knowledge of the soap namespace or the name of the namespace nor the element name within the body. The soap envelope can come in many ways. For examples: <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <I_Need_This_One xmlns="king.kong.loves.godzilla"> <anythingElseDownHere> </anythingElseDownHere> </I_Need_This_One> </S:Body></S:Envelope> or <Soap:Envelope xmlns:Soap="http://schemas.xmlsoap.org/soap/envelope/"> <Soap:Body> <I_Need_This_One xmlns="king.kong.loves.godzilla"> <anythingElseDownHere> </anythingElseDownHere> </I_Need_This_One> </Soap:Body></Soap:Envelope> or <Mothra:Envelope xmlns:Mothra="http://schemas.xmlsoap.org/soap/envelope/"> <Mothra:Body> <I_Need_This_One xmlns="king.kong.loves.godzilla"> <anythingElseDownHere> </anythingElseDownHere> </I_Need_This_One> </Mothra:Body></Mothra:Envelope> And I need the XPath to extract both "I_Need_This_One" and "king.kong.loves.godzilla" into XSL variables. I've tried all kinds of variants of "/*/*[local-name()=Body]/*[local-name()]", and "//*[local-name()=Body]/*[local-name()]", but all I seem to get is everything below "anythingElseDownHere". So, I'm lost as to what to do.
  • Create New...