5 Replies Latest reply: May 15, 2014 10:00 AM by Gareth Horton RSS

    xsl or xml question

    tomkrier _

      With the style sheets I can't get the links to work within the document.  It doesn't work when the extension is .xmod, but it does when I change it to .xml.  Is there anything I can do?

        • xsl or xml question
          Gareth Horton

          Tom,

           

          Give me a little more background on what you are doing and I'll try and look into it.

           

          Gareth

           

          Originally posted by tomkrier:

          With the style sheets I can't get the links to work within the document.  It doesn't work when the extension is .xmod, but it does when I change it to .xml.  Is there anything I can do? /b[/quote]

          • xsl or xml question
            tomkrier _

            I'll describe the steps so you can replicate the issue. First take any .xmod and open it in a text editor. (This PC must have standard Monarch 8.0 installed).  At the top of the .xmod paste <?xml-stylesheet type="text/xsl" href="C:program filesmonarchmodel.xsl" ?>(make sure the link points to the xsl)

            Now you should be able to open it with IE and the stylesheet will have been applied.  The issue comes into play when you try and click on the links up at the top like Templates, Fields, Audit Trail.  Those links do not work when it is named a .xmod, but if you change the extension to .xml and reopen it in IE the links work.  Is there anyway around this? It not a pressing issue but I was just wondering.

            • xsl or xml question
              tomkrier _

              Another note I wanted to add about .xmod's and .xprj's is that when you create them in Monarch 8.0, and open them with a text editor, it is basically one long line.  When you open .xprj's that you editted on Datapump with a text editor they apply line breaks and spacing.  It also becomes <project version="XMLPRJ02"> instead of <project version="XMLPRJ01">  I was wondering why can't Monarch make project files like this? Now as far as models go I have not been successful in getting line breaks and spacing to appear at all.

              • xsl or xml question
                Gareth Horton

                Tom

                 

                It looks like IE will only accept the .XML extension when performing some XSL transformation tasks.

                 

                I don't know why this is the case.

                 

                As you may notice in the registry, both the model and project are stup up as text/xml content types, which should be sufficient.

                 

                I did try adding a new shell open key for xmod that exactly matched the shell open key for xml in the registry, but to no avail.

                 

                If you open an XMOD or XPRJ customized like you specify in an XML app such as XML Spy, it works perfectly.

                 

                Perhaps it is a bug / security feature in IE.

                 

                Gareth

                 

                Originally posted by tomkrier:

                I'll describe the steps so you can replicate the issue. First take any .xmod and open it in a text editor. (This PC must have standard Monarch 8.0 installed).  At the top of the .xmod paste <?xml-stylesheet type="text/xsl" href="C:program filesmonarchmodel.xsl" ?>(make sure the link points to the xsl)

                Now you should be able to open it with IE and the stylesheet will have been applied.  The issue comes into play when you try and click on the links up at the top like Templates, Fields, Audit Trail.  Those links do not work when it is named a .xmod, but if you change the extension to .xml and reopen it in IE the links work.  Is there anyway around this? It not a pressing issue but I was just wondering. /b[/quote]

                • xsl or xml question
                  Gareth Horton

                  Monarch does not really have to think about "pretty printing" the XML, as it is generally only used internally.  When viewed, it always uses a provided stylesheet or the IE default stylesheet rendering only.

                   

                  The XPRJ editor in MDP uses the .NET classes for writing the XML, which makes the XML pretty by default. 

                   

                   

                  Gareth

                   

                  Originally posted by tomkrier:

                  Another note I wanted to add about .xmod's and .xprj's is that when you create them in Monarch 8.0, and open them with a text editor, it is basically one long line.  When you open .xprj's that you editted on Datapump with a text editor they apply line breaks and spacing.  It also becomes <project version="XMLPRJ02"> instead of <project version="XMLPRJ01">  I was wondering why can't Monarch make project files like this? Now as far as models go I have not been successful in getting line breaks and spacing to appear at all. /b[/quote]