Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4114758
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:29:45+00:00 2026-05-20T22:29:45+00:00

We’ve used php to build up an interface that the client can upload svg

  • 0

We’ve used php to build up an interface that the client can upload svg graphic, then click the button to do an XSLT transform.

The interface and underlying XSLT worked perfectly fine previously, until recently, the xslt process will always fail and return error like: could not find http://www.w3.org or sth (Cannot remember quite exactly).

Our client uses Adobe Illustrator to create SVG graphics, and then use our tool to do the transform, and the SVG graphics that directly come out of Adobe Illustrator has the following three lines on the top of every SVG file:

<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.0.0, SVG Export Plug-In . SVG Version: 6.00       
  Build0)  -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG   
 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

We did some research and we came to conclustion that w3.org is blacklisting our client’s server (Windows Server 2003). The normal workaround is to do a resolver. Since the client will only give us 1 hour or so to do the remote control on their stuff, so I am thinking if there is a simpler way to handle this issue.

One proposed way is we could place a flatfile.dtd on client server, so every incoming SVG file can reference that, and we use the php to manipulate the SVG file, scan the file until it finds the "<!DOCTYPE.." string, then replace the whole string with another "<!DOCTYPE.." in which the url is now pointing the local flatfile.dtd, save the file and then begin the XSLT process. Then after the translation, we do the reverse process, which is to reset the dtd url from our local dtd to the default w3.org one.

I will try do this tomorrow, and our demo is on Friday. So I am just seeking some advice here if this way is realisitic and has it any risks? Or, could any experts give some better alternatives to deal with this issue?

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:29:46+00:00Added an answer on May 20, 2026 at 10:29 pm

    It’s not clear but I think you’re saying you only need a temporary fix for the purposes of a demo? If so, why not add an entry to the server’s host file that maps http://www.w3.org to 127.0.0.1 (localhost) or to the ip of a server that you control? Then you can populate the path of this server with the appropriate dtd file. After the demo, don’t forget to remove the host entry so everything is back as it was.

    The nice thing about this is that you don’t have to manipulate the DOCTYPE string in your code since the existing url will resolve to a server that you control.

    This solution assumes that you don’t have to dereference any other resources at http://www.w3.org besides this dtd. You should be able to test this on any server that runs your demo though.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.