Jump to content

XSLTnewbie

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by XSLTnewbie

  1. I just found out that a child element may refer to different namesace than their parent's namespace. How is this possible? even crazier, the attributes can also have their own namespace and what a shocker, their namesapce may also differ from the attribute's owning element's namespace. is there a sample case where such confusing feature is useful? I've been scratching my head on this problem for days. Really need some help in this. thanks
  2. This is a snippet from an xsd file: <schema xmlns=”http://www.w3.org/2001/XMLSchema” xmlns:target=”http://www.example.com/name”'>http://www.example.com/name” targetNamespace=”http://www.example.com/name”'>http://www.example.com/name” elementFormDefault=”qualified”> 1. what's the purpose of targetNamespace attr? and the XML : <?xml version=”1.0”?> <name xmlns=”http://www.example.com/name”'>http://www.example.com/name” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xsi:schemaLocation=”http://www.example.com/name name5.xsd” > 1. does the name element must point to the same namespace as the target namespace(or targetNamesace attr?) in the xsd? 2. what's the purpose of schemalocation? and why is there a whitespace there? thanks
  3. I have <input type="file" id="myfile"/> Now, I want to parse this file and get a certain node value from it to do further processing. Does anybody know any working solution that actually works on IE8 and above? thanks
  4. hello, anybody knows any free tool for this? any software I can download? because I don't have internet connection at home. thanks
  5. I have multiple nodes that have exact same structure: <debitcard> <debitcard type="gold"> <name>name1</name> <isPhotoExist>Yes</isPhotoExist> </debitcard> <debitcard type="silver"> <name>name2</name> <isPhotoExist>No</isPhotoExist> </debitcard></debitcard><creditcards> <creditcard type="gold"> <name>name2</name> <isPhotoExist>Yes</isPhotoExist> </creditcard> <creditcard type="platinum"> <name>name3</name> <isPhotoExist>No</isPhotoExist> </creditcard></creditcards> I'll just two of them here. I need to process these nodes exactly the same way, but the problem arises when there are selections that requires "creditcard" or "passcard" as part of the expression (e.g creditcard[type=platinum]). Is there any way so I can process these nodes with just one generic template instead of multiple template approach I'm using right now? thanks
  6. As far as I know operation refers to the methods in the class that provides the web service and endpoint is the URL where the web service is published. Is this correct? thanks
  7. Hi, Does anyone know any free tool that can be used to test XSLT transformation on XML files? I need a tool that can process multiple XSLT files. Tried doing it in browsers, but didn't produce anything, or it only mentioned that there's an error in the xslt file but didn't specify where or what the error was. thanks
  8. ok, could you please show me some example where I do need namespace? thanks
  9. in what case would asking for a first name be returning all the first names? I'm only familar with xslt, so even without the namespace for husbandname and wifename element, I'll be able to access using "/husbandname/first" XPath expression. Am I missing something here? thanks
  10. <hn:husbandname xmlns:hn=”http://www.example.com/name”><first>John</first><middle>Fitzgerald</middle><last>Doe</last></hn:name><wn:wifename xmlns:wn=”http://www.example.com/name”><first>Jane</first><middle>Fitzgerald</middle><last>Doe</last></wn:name> how about this one then? do I need to prefix the <first>, <middle> and <last> elements? and if I do, whose elements should I prefix? the husband, the wife or both, or neither? thanks
  11. How do I write the WSDL? as of now, I let eclipse publish the WSDL using the Endpoint.publish command in Java. thanks
  12. hi, thanks for the response. But is it possible to actually get this display in the WSDL <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:main="http://main.soap.com/"> <soapenv:Header/> <soapenv:Body> <main:getMessage> <Name>abc</Name> </main:getMessage> </soapenv:Body></soapenv:Envelope> if it is, could you tell me how? which code should be added or modified? thanks
  13. sorry, you lost me there. are we still talking about the <first> and <middle> and <last> element here? I was confused whether to add prefix to <first>, <middle> and <last> if it's contained in a prefixed element <name> like shown below: <n:name xmlns:n=”http://www.example.com/name”><first>John</first><middle>Fitzgerald</middle><last>Doe</last></n:name> and if I do, what's would the effect be if I dont add prefixes to <first>, <middle> and <last> element? Thank you so much.
  14. thanks for the reply justsomeguy, but I still don't quite understand yet. Could you please give me an example? thanks heaps
  15. what's the difference between <n:name xmlns:n=”http://www.example.com/name”><n:first>John</n:first><n:middle>Fitzgerald</n:middle><n:last>Doe</n:last></n:name> and <n:name xmlns:n=”http://www.example.com/name”><first>John</first><middle>Fitzgerald</middle><last>Doe</last></n:name>
  16. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:main="http://main.soap.com/"> <soapenv:Header/> <soapenv:Body> <main:getMessage> <arg0>abc</arg0> </main:getMessage> </soapenv:Body></soapenv:Envelope> This is the SOAP request generated by soapUI for the web service I created. The webservice method looks like this : @Override public String getMessage(String name) { return "Your name is " + name; } What I want to ask is why does the parameter use the element <arg0> instead of <name> which is the variable name for the parameter in the method? I'm using Java to generate the web service. Also, I'd like to know how to publish the webservice if I have more than one class for my service methods? I normally publish the webservice using this syntax: Endpoint.publish("http://localhost:8080/myservice", new Webservice1()); what if I have another class called Webservice2 or Webservice3 and I want to publish it on localhost8080:/myservice too? I'll get "Address already in use". Thanks
  17. I also have trouble understanding the difference between qualified and prefixed elements: <schema xmlns=”http://www.w3.org/2001/XMLSchema”targetNamespace=”http://www.example.com/name”xmlns:target=”http://www.example.com/name”> and this one: <xs:schema xmlns:xs=”http://www.w3.org/2001/XMLSchema”targetNamespace=”http://www.example.com/name”xmlns=”http://www.example.com/name”> what's the difference? I only see that schema is prefixed, but name is not in the latter. what are the effects if I choose one over the other? also this: <name xmlns=”http://www.example.com/name”><first>John</first><middle>Fitzgerald</middle><last>Doe</last></name> the example said that the elements (first, middle and last is qualified). I'll just assume that that would mean they won't get mixed up with other <first> element that belongs to other vocab.and also, is this what you call default namespace? <n:name xmlns:n=”http://www.example.com/name”><n:first>John</n:first><n:middle>Fitzgerald</n:middle><n:last>Doe</n:last></n:name> now this one is a bit weird. why do you need to prefix all the elements when previous example already qualifies the elements that belong to "name" vocab? thanks
  18. I see this kind of declaration a lot in XSL files: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> and I tried opening the address referred to in the above declaration (http://www.w3.org/1999/XSL/Transform), and it's just a regular webpage, not some kind of collection of commands or syntax like I expected. my questions are: 1. how is this possible? how does machine understand commands like xsl:value-of if there's no specific codes in that URL? 2. what would happen if w3.org is down? will all web service that uses this namespace blow up? and in the web service XML message, the structure is like so: <foo:concat xmlns:foo="http://ttdev.com/ss"><s1>abc</s1><s2>123</s2></foo:concat> let's say ttdev.com is a domain name I purchased (I put my web service in that server). and let's say for some reason, I change the domain name to myservice.com (switch to cheaper provider, etc.), does this mean the above message will blow up when trying to access my service which is now located at myservice.com? thanks a lot
×
×
  • Create New...