• Login
Community
  • Login

Need to load XSD

Scheduled Pinned Locked Moved General Discussion
6 Posts 4 Posters 11.4k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G
    ganesan govindarajan
    last edited by Sep 5, 2018, 10:57 AM

    Hi All

    I wanted to load new XSD in to the xml file.

    I am just open the xml and validate, but there is no pop up showing to load new XSD.

    Can anyone advise on this?

    ganesang

    S 1 Reply Last reply Sep 5, 2018, 1:59 PM Reply Quote 0
    • S
      Scott Sumner @ganesan govindarajan
      last edited by Sep 5, 2018, 1:59 PM

      @ganesan-govindarajan

      This is not really a Notepad++ related question…

      1 Reply Last reply Reply Quote 0
      • C
        chcg
        last edited by Sep 5, 2018, 9:12 PM

        @ganesan-govindarajan Maybe you want to check N++ plugin XML Tools, see https://github.com/morbac/xmltools

        1 Reply Last reply Reply Quote 1
        • G
          ganesan govindarajan
          last edited by Sep 6, 2018, 9:46 AM

          @chcg

          Thanks for the reply.

          I have already installed the XML tool plugin but my concern is when i open the new XML file which is different schema (XSD) than previous file and there is no pop-up show to load new schema file in Notepad++.

          1 Reply Last reply Reply Quote 0
          • P
            PeterJones
            last edited by PeterJones Sep 6, 2018, 1:23 PM Sep 6, 2018, 1:22 PM

            I don’t use XML (and thus XML Tools), so I’m not an expert on such things… But a quick google found https://stackoverflow.com/a/30167471/5508606 , which claims that Plugins > XML Tools > Validate Now should pop up a window asking for where the XSD is. Does the procedure shown on Stack Overflow not work for you? If not, what does happen?

            As a test, I just grabbed the XML example from https://www.w3schools.com/xml/schema_example.asp , and when I tried to validate it, it said “Failed to locate the main schema resource at ‘shiporder.xsd’” – which was defined with the xsi:noNamespaceSchemaLocation. If I remove that from the <shiporder ...> tag, then when I try to validate, it asks me for the location. So my conclusion is that XML Tools will only ask you for the schema location if it’s not embedded in the XML itself; if it is embedded, it will automatically use the one it finds. (It even says that in the dialog: “This dialog box is displayed because the default validation schema cannot be found in XML root element. To avoid having to specify the XSD for every validation, please define the default XML schema in your root element using the following syntax: …, where XSD_FILE_PATH is the relative or absolute path of the XML schema file.”)

            If this doesn’t happen for you, give us a brief example XML and XSL that shows the problem. To embed the files in your reply, put 4 spaces before each row, and a blank line before and after, shown below.

            ----------

            Formatting / Rendering Example

            
            **XML**
            
                <?xml version="1.0" encoding="UTF-8" ?>
                <shiporder ...
                ...
                </shiporder>
            
            **XSD**
            
                <?xml version="1.0" encoding="UTF-8" ?>
                <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                ...
                </xs:schema> 
            
            

            which will render like

            XML

            <?xml version ...
            <shiporder ...
            

            XSD

            <?xml version="1.0" encoding="UTF-8" ?>
            <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
            ...
            </xs:schema>
            
            1 Reply Last reply Reply Quote 3
            • P
              PeterJones
              last edited by guy038 Feb 25, 2020, 2:02 PM Sep 6, 2018, 1:26 PM

              PS: also look at Plugins > XML Tool > About XML Tools, and include your version of XML Tools. Also go to ? > Debug Info > Copy debug information to clipboard and paste in your reply. These will let us know the particulars of which Notepad++ and XML Tools, so we can try to better replicate your circumstances.

              Update Feb 25, 2020: issue #11 has been closed; the problem is fixed as of XML Tools v3.0.3.2

              1 Reply Last reply Reply Quote 1
              2 out of 6
              • First post
                2/6
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors