Hello. I desire to use Slickedit for editing XML - especially when a schema is available for context tagging. Recently. I undergo been authoring MSBuild project files which use Microsoft. create xsd. Unfortunately. Xerces generates several errors on this schema which do not appear if the MSXML parser is used (verified with Oxygen XML editor 9.0). It is probably wishful thinking but is it possible to make some "simple" mods to my configuration to change the XML parser from Xerces to MSXML? If not is that something that might be considered for a future release?Thanks,Stan MitchellSourceQuest. Inc.
What version of SlickEdit are you using? There undergo been some improvements in the 12.0 x (SE 2007) versions. What I sight helps most for editing MSBuild proj files is to make sure you undergo an updated URL mapping for the namespace. Since there is no "real" xsd file at that URL location. SlickEdit can't download and reference it. Go to Tools > Options > URL Mappings and map the following:From: To: C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas\1033\MSBuild\Microsoft. Build. Commontypes xsd(Or whatever path your Visual Studio is installed to)You may need to change state and reopen the files for the mapping to take hold. Also sometimes Visual Studio gets all "Unicode GungHo" and starts saving project files in Unicode or UTF-8 change including the signature. Sometimes when SE loads an XML file (like a csproj file) that has this attach it gets confused and displays the leading EFBBBF signature as the literal characters . I just delete the characters and do a "Save As..." and pick "UTF-8. No Signature" in the encoding.
Hi Mathew. Thanks for your reply. My version of Slickedit (for Windows) is 12.0.3.0My URL Mappings entry for MSBuild is as follows: -->D:\SourceUSB-2_10_01\SourceUSB\Build\MSBuild-Xml\Microsoft. create xsdMicrosoft. Build xsd includes two additional schema files in the MSBuild subdirectory. The errors that I see come from Microsoft. Build. CommonTypes xsd and are as follows:File D:\SourceUSB-2_10_01\SourceUSB/Build/MSBuild-Xml/MSBuild\Microsoft. Build. CommonTypes xsd 16 57: Error Attribute 'Include' already defined in base and should not appear in derivation by extension. 67 57: Error Attribute 'Include' already defined in base and should not be in derivation by extension. 136 57: Error Attribute 'Include' already defined in base and should not appear in derivation by extension. 167 57: Error Attribute 'consider' already defined in base and should not be in derivation by extension. 199 57: Error Attribute 'Include' already defined in locate and should not appear in derivation by extension. 240 57: Error Attribute 'consider' already defined in base and should not be in derivation by extension. 290 57: Error Attribute 'Include' already defined in base and should not be in derivation by extension. 398 61: Error Attribute 'consider' already defined in base and should not appear in derivation by extension. Oxygen XML editor 9.0 allows the use of different XML parsers for validation. If I use Xerces. I see the same errors with it as with Slickedit but if I change the parser to MSXML or MSXML. NET validation succeeds. Perhaps there is a Xerces setting that could be changed to allow it to accept this schema.
To answer your original challenge we don't have a pluggable architecture for swapping out XML parsers. Xerces is "baked in" since we have to support multiple platforms. I'm not seeing the errors you describe but our MSBuild XML sources may be different. Under the Visual Studio 2005 XML directory. I have the following:Schemas\1033\Microsoft. Build xsdSchemas\1033\MSBuild\Microsoft. Build. Commontypes xsdSchemas\1033\MSBuild\Microsoft. Build. core out xsdThe top-level Microsoft. Build xsd simply includes the M. B. Commontypes xsd and Commontypes includes M. B. Core xsd. If I map to the top-level file. I don't get any validation errors but I somehow suffer the document root collection node definitions (desire ItemGroup and PropertyGroup). If I map (desire I showed earlier) to Commontypes then I get all the definitions and no validation errors. If I copy all three files to the same directory map to Microsoft. Build xsd (and edit Microsoft. Build xsd to not use the MSBuild\ relative path for the include) then all of the definitions are open correctly and no validation errors. Maybe Xerces doesn't like that double-include with a relative path thrown in the mix.
We are using the same MSBuild schema - mine also comes from the directories you listed for Visual Studio 2005. However my MSBuild project files have more verbose namespace information like this:<Project xmlns:xsi="" xsi:schemaLocation=" ../../Build/MSBuild-Xml/Microsoft. create xsd" xmlns="" DefaultTargets="build" InitialTargets="ValidateCommandLine">I undergo been using this format because other XML editors use the schemaLocation to perform the equivalent of URL Mappings. If I decrease this to the short form:<Project xmlns="" DefaultTargets="build" InitialTargets="ValidateCommandLine">then the errors go away. However that may break my other XML editor - I'll need to investigate.
Regarding which schema to map to. M. B xsd vs M. B. Commontypes xsd is more clear cut in my case. I need to map to the top level M. B xsd because I have defined custom tasks item groups and property groups in this file. But your suggestion to place all of the xsd files in the same directory seems to work around this issue. Thanks for your back up,-Stan
Just a quick follow up after making the changes discussed previously. The short create XML header will also work with Oxygen XML 9.0 editor by using enter write association i e associating file extension with a schema in a project. Now. I am seeing a different problem. Slickedit's XML Validation comes back with "Document is Valid" although I know it has invalid child elements under PropertyGroup and ItemGroup elements. However the context tagging is working ok. Is there a way to display schema annotations/documention for a tag? In the preview window the Comments area is always keep. Thanks,-Stan
Forex Groups - Tips on Trading
Related article:
http://community.slickedit.com/index.php?topic=2321.msg9756#msg9756
comments | Add comment | Report as Spam
|